A double?

A double has a 52 bit mantissa and can therefore hold integers up to 2^53 before losing precision, as in you would stop being able to accurately represent them perfectly.

Anything multiplied by 602210000000000000000000 is way out of a doubles range, even out of a long doubles range.

@tolu619: I think you are picking the wrongest tool for the job here. Maybe Mathematica would be more suitable for your needs? The alternative is that you roll your own integer type that has enough bits for your needs. If 20 * 602210000000000000000000 is the highest number you'll have, you need at least 85 bits to store it.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com