Very large numbers



  • I work mainly with VB.Net and recently I was asked to work with some insanely large numbers.  The largest number that VB.Net can handle is 9223372036854775807, though, and I'll need to be able to handle numbers much larger than that without converting them to scientific notation.  I'm sure there is something already built out there that I could just download and reference - or even a preferred method - but I can't find anything.

    I would appreciate any help.  Thanks!



  • If you can tell us, what is the nature of the project that involves numbers that big that have to be that precise?

    Sorry to be of no help...[:(]



  • Hmm so roughly the number you quoted is 2^63 or a signed 64-bit int.

    What opperrations do you need to perform on the number ?

    Also, could you deal with having to call if(BigInt::LessThan(a, 1000000)) { ..... }... err sorry you're using VB that would be if BigInt.LessThan(a, 1000000) Then ...., instead of if a < 1000000 Then ... and so on for most other opperations ?
    If so you could try using a libary for this ( I have found them on Google for C, C++, Perl, etc ) or porting one of the librarys to VB.Net.

    BTW is this cryptology related ?



  • I was told that I had to write a flexible program to find very large prime numbers, "quickly"... so, I'm assuming so, yes. 

    I decided I was going to use modular division... just kidding.





  • That's exactly what I'm looking for.  Thanks a lot.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.