Paul Berkowitz wrote on Wed, 14 May 2003 14:40:28 -0700:
>2 ^ 29 as double integer
>--> 5.36870912E+8 -- no error
>
>2 ^ 62 as double integer
>--> 4.61168601842739E+18
>
>(2 ^ 62) as real
>--> 4.61168601842739E+18
>
>(So 'real' is same as 'double integer'.)
It certainly seems to be!
(2 ^ 29) as double integer
class of result
--> real
1 as double integer
class of result
--> real
But:
1.5 as double integer
--> 2.0
2.5 as double integer
--> 2.0
So. A nice, faster than 'round', IEEE-standard rounding process for
someone:
(n as double integer) div 1
Though that's still not as fast as:
if (n mod 2) ^ 2 > 0.25 then
n div 0.5 - n div 1
else
n div 1
end if
NG