Hello,
I am working on large number theory and i need to work with numbers up to 1.00x10^700 What are my options? From what i understand C++ wont work because it can only deal with numbers: 2.2^-308 to 1.8^308
Thanks!
Printable View
Hello,
I am working on large number theory and i need to work with numbers up to 1.00x10^700 What are my options? From what i understand C++ wont work because it can only deal with numbers: 2.2^-308 to 1.8^308
Thanks!
In theory, you can use long doubles, which are 80 bit extended floating point types & go up to something like 1E4100.
If you are using MSVC, this option is closed to you as VC maps long doubles to doubles.
However, the Borland compilers support long doubles along with a set long extended math routines.
You could also try GCC, but I've never used it, so can't comment.
Or - alternatively you can get your hands on an extended floating point class. This would not be dependent upon the FPU and precision and range would be arbitrary. The down side would be that calculation is slower.
Thanks... I have borland5.5 free complier...but that doesnt seem to want to handle long doubles... any suggestions?