i tried google it, key words references funtions or solutions working content of variable.
my question simple. if variable represents number,
var = 1;
what max bit length? mean, highest number can contain before buffer overflow happens? int32? int64? different length?
thanks in advance
as the spec says, numbers in javascript ieee-754 double-precision floating point:
- they're 64 bits in size.
- their range
-1.7976931348623157e+308
through1.7976931348623157e+308
(that latter available vianumber.max_value
), positive , negative versions of(2 - 2^-52) × 2^1023
, can't represent of values. famously,0.1 + 0.2
comes out0.30000000000000004
; see is floating-point math broken? - the max "safe" integer value (whole number value won't imprecise) 9,007,199,254,740,991, available
number.max_safe_integer
on es2015-compliant javascript engines. - similarly,
min_safe_integer
-9,007,199,254,740,991
Comments
Post a Comment