[squeakdev] Re: Float hierarchy for 64bit Spur
Bert Freudenberg
bert at freudenbergs.de
Fri Nov 21 12:47:50 UTC 2014
On 21.11.2014, at 02:51, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> Hi All,
>
> 64bit Spur can usefully provide an immediate float, a 61bit subset of the ieee double precision float. The scheme steals bits from the mantissa to use for the immediate's 3bit tag pattern. So values have the same precision as ieee doubles, but can only represent the subset with exponents between 10^38 and 10^38, the singleprecision range.
This is worded confusingly. It sounds like the mantissa has 3 bits less, which would make it less precise.
Here is how I understood it: The mantissa is stored with its full 52 bits of precision (*). But only the lower 8 bits of the 11bit exponent are stored. If the upper 3 bits of the exponent are needed, then a boxed float is created.
I guess I know what you meant, that it is the 3 lowest significant bits in an oop which are used for tagging immediate objects, and in an IEEE double that is part of the mantissa. But these 3 bits are not lost, but moved elsewhere (namely where the 3 highest significant bits of the exponent used to be stored).
Did I understand correctly? You haven't pushed the code yet so I couldn't verify.
 Bert 
(*) http://en.wikipedia.org/wiki/Doubleprecision_floatingpoint_format
 next part 
A nontext attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7signature
Size: 4142 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeakdev/attachments/20141121/05394a7a/smime.bin
More information about the Squeakdev
mailing list
