So I noticed that if a number is too big it becomes infinity but there's also a certain size where all of the digits past a certain point become 0. So what's the largest value a global variable (or any variable) can hold accurately?
614889782588491390 It seems like this might be the highest? If I increase the value, even by 1 it gets rounded back down to 614889782588491390
numbers are 64bit floating point values. You probably can get all the info you want by googling that.
I believe the limits are tied to what javascript can offer, so we have :
Number.MAX_VALUE => 1.7976931348623157e+308 Number.MIN_VALUE => 5e-324 (smallest value close to 0) Number.MAX_SAFE_INTEGER => 9007199254740991 Number.MIN_SAFE_INTEGER => -9007199254740991 [/code:3ffd3qst]
Magistross - Unsigned integers have a Javascript limit of 2*MAX_SAFE_INTEGERS - but idk if they are accessible from the IDE
I don't even think you can have unsigned integers stored in a javascript Number.
Magistross, there are a few outside libraries for this, or you can use bit manipulation to simulate them
Develop games in your browser. Powerful, performant & highly capable.
Aren't bit manipulation limited to 32 bits integers ?
Magistross - true