Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maximum integer range of Number

We are doing some maths with large integers in Actionscript 3. Because there is no long type, we are using Number.

What's the range of consecutive integers (positive to negative) a Number can accurately represent before it starts to veer into floating point errors?

like image 573
ICR Avatar asked Mar 28 '26 22:03

ICR


1 Answers

ActionScript® 3.0 Reference for the Adobe® Flash® Platform states that the Number data type adheres to the double-precision IEEE-754 standard. In IEEE-754 double-precision, there are 64 bits in use (1 for sign bit, 11 bits for exponent and 52 bits for fraction).

Therefor maximum integer range should be approximately ±1.7976931348623157×(10^308)

See Also MAX_VALUE and MIN_VALUE in Number class.

like image 123
Amith Chinthaka Avatar answered Apr 02 '26 03:04

Amith Chinthaka



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!