[squeak-dev] floats

Colin Putney cputney at wiresong.ca
Sun Mar 15 01:51:40 UTC 2009


Jecel Assumpcao Jr wrote:
> Eliot Miranda wrote:
>
>> - port to AMD64/EMT64 with a 64-bit object representation that uses
>> the two-word header format in the new object model and immediate
>> doubles (as I did in 64-bit VW).
>
> One cute idea I saw somewhere was using 64 bit floats for everything,
> fitting all other objects into the NaN encoding. Even if you select only
> one of the four kinds of NaNs (postive/negative, signalling/silent) you
> still have 52 bits to play around with.
>
> Would an immediate float representation for 32 bit VMs be of any
> interest? It seems to me that ...xxxx1 represents SmallIntegers and
> ..xxxx00 represents oops, so ...xxxx10 would be free to use for floats
> with 30 bit precision (what Self has).

Yeah, that's cute... but it seems misdirected to me. Are floats that 
important? I'd actually like to see the compiler emit scaled decimals 
for literals with decimal points, and have FloatingPointArithmetic be a 
loadable package for those who know that they really to want floats.

Colin



More information about the Squeak-dev mailing list