Help with turning 1e+21 into 1.00Qn

Uh… What? You do realize that a temporary number that you receive from adding 2 floats is a float. If the first float is massive, while the second one is anything, the result will also be massive. The issue is the part which I repeated twice, massive numbers. Addition gives a massive number which has a floating point error.

3 Likes

Not sure what you guys are arguing about with respect to floats. Floats can safely go up to a little higher than a centillion (1 with 303 zeros after it).

Storing numbers up to this size does not cause any errors. The only thing is that if you take a massive number such as 10^200 and try to add 50 to it, that won’t do anything. It won’t do anything because of the way floats represent numbers but I find this to be a non-issue as 50 is such an incomprehensibly smaller number than 10^200 that the difference is negligible.

Miner’s Haven doesn’t do any fancy hacks to store or modify its humongous numbers, and you shouldn’t need to either unless you want to go way higher than a centillion. If you want to do that, you have to define your own “Big number” datatype and define all the basic numerical operations such as addition, multiplication, etc. for that datatype. There is no easy “hack” like the nonsensical tonumber suggestion you can use to squeeze functionality out of floats that isn’t already there.

6 Likes