Originally Posted by
Elkvis
this is not correct. for a 32-bit number to allow that 3 trillion figure, it would have to have 3 states per bit (1.853E+15). a 64-bit integer would be more appropriate here, if you want to use only integral types, but like salem says, doubles would be the most appropriate.