[Vm-dev] Potential problems with 64bit spur large SmallInteger
comparison
Nicolas Cellier
nicolas.cellier.aka.nice at gmail.com
Fri Dec 26 15:48:26 UTC 2014
One of the problem I foresee is this one:
1.0e17 >= 100000000000000001
indeed, the (generated) primitive currently convert the SmallInteger to
double, and this one is true:
1.0e17 >= 100000000000000001 asFloat
In 32 bit Spur/COG with 30 bit max magnitude, it was OK because every
conversion SmallInteger -> Double was exact - like all integer in the range
[-2^53,2^53] - see Float class>>maxExactInteger
In 64 bits Spur, this might not be the case anymore since some SmallInteger
exceed this range...
So the (generated) primitive must be protected with some range test.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20141226/2e94eb3d/attachment.htm
More information about the Vm-dev
mailing list