Literals/Integer: Difference between revisions

m
→‎{{header|Phix}}: removed contradictory dunno, added personal tag
m (→‎{{header|Phix}}: removed contradictory dunno, added personal tag)
Line 1,561:
In the 32-bit version, integers outside -1,073,741,824 to +1,073,741,823 must be stored as atoms, which [ie a 64-bit float] can (accurately) store integers up to 9,007,199,254,740,992:
between 9,007,199,254,740,992 and 18,014,398,509,481,984 you can only store even numbers, and between 18,014,398,509,481,984 and 36,028,797,018,963,968, you can only store numbers divisible by 4, and so on. (ie as you need more and more bits on the front, eventually bits must start falling off the end)<br>
In the 64-bit version the limits of integers are -4,611,686,018,427,387,904 to +4,611,686,018,427,387,903. Offhand I don't know<br>
the exact highest integer an 80-bit float can hold, but the limits should all be 512* the values given above for 32-bit.<br>
The included mpfr/gmp library allows working with extremely large integers with arbitrary precision, very efficiently.
 
<!--<lang Phix>(phixonline)-->
<span style="color: #0000FF;">?{</span><span style="color: #000000;">65</span><span style="color: #0000FF;">,</span><span style="color: #000000;">#41</span><span style="color: #0000FF;">,</span><span style="color: #008000;">'A'</span><span style="color: #0000FF;">,</span><span style="color: #7060A8;">scanf</span><span style="color: #0000FF;">(</span><span style="color: #008000;">"55"</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"%d"</span><span style="color: #0000FF;">),</span><span style="color: #000000;">0o10</span><span style="color: #0000FF;">,</span><span style="color: #000000;">0</span><span style="color: #0000FF;">(</span><span style="color: #000000;">7</span><span style="color: #0000FF;">)</span><span style="color: #000000;">11</span><span style="color: #0000FF;">}</span>
<!--</lang>-->
 
7,796

edits