Incredibly Large Numbers

Rephistorch

Member
Joined
Oct 4, 2005
Messages
16
Programming Experience
3-5
To anyone reading,

I was wondering if there was a good way to handle incredibly large numbers (on the order of 1,000,000 + digits). Is there any way to make visual basic actually recognize said numbers and use them in normal functions? (as in +, -, *, /, Mod, \, ^... etc) My best guess to how this could be accomplished is a very, very large string array, however, using a string array i would have to 're-invent' math. Meaning I would have to do any, and all equations and mathematical operators by specifically telling it how to do just about everything in the coding. Thanks for any replies.

Rephistorch
 
I would guess that you would have to create your own type and build the calculation functionality into it by declaring operators. Your type might have several Long members that represented blocks of digits from the complete number. I'm sure it's been done before, although perhaps not in VB.NET as its not known as the language of choice for applications that require that sort of calculation.
 
Yeah it's definitely not known as the program of choice, but I still need to take a course on c++, as i have yet to learn it extensively (I'm 16). I thought about making a large array of long numbers (which i think you suggested). Well, thanks for the reply... I'm off to writting large amounts of tedious code.
 
Back
Top