javamathbiginteger

How to calculate with googol or even larger numbers in java?


Is that theoretically possible? Even BigIntegers should fail, AFAIK, since they are internally based on an Array, and these have a limited size. Is it possible to directly calculate with the exponential form of googolplexes in Java? for example: ((10^10^100)/2)-5

How do I prepare an application, which has googol-sized numbers as genuine results?

(For those who don't know: a googol == 10^100, a googolplex == 10^10^100)


Solution

  • I think you should try symbolic math library. Symbolic math library perform operations on equation structure and do not try to represent numbers internally.

    Some links to start:

    https://code.google.com/p/symja/

    http://www4.ncsu.edu/~kaltofen/bibliography/99/BCK99.pdf

    Good luck.