[squeak-dev] [Vm-dev] [commit][3152] Make sure to compile the SmallFloat64 primitives.

Eliot Miranda eliot.miranda at gmail.com
Fri Dec 5 16:13:34 UTC 2014


Hi Ben,

On Dec 5, 2014, at 5:52 AM, Ben Coman <btc at openInWorld.com> wrote:

> Bert Freudenberg wrote:
>> ------------------------------------------------------------------------
>> On 26.11.2014, at 23:42, Eliot Miranda <eliot.miranda at gmail.com <mailto:eliot.miranda at gmail.com>> wrote:
>>> 
>>> No.  Bert suggested (IIRC) ImmediateFloat64 and BoxedFloat64 and I went with SmallFloat64 and BoxedFloat64 for two reasons.  SmallFloat64 because I like the symmetry with SmallInteger, and because this name scheme gracefully admits SmallFloat32, BoxedFloat32 and BoxedFloat80 if ever there was the energy to add them.
>> Here’s my message (sent private to Eliot to not prolong the bikeshedding):
> 
> AhHA! You let the cat out of the bag then....
> Sorry, I just had to pull that bike out one more time...
> 
>>> From: Bert Freudenberg <bert at freudenbergs.de <mailto:bert at freudenbergs.de>>
>>> Subject: Re: Float hierarchy for 64-bit Spur
>>> Date: 24. November 2014 11:50:34 MEZ
>>> To: Eliot Miranda <eliot.miranda at gmail.com <mailto:eliot.miranda at gmail.com>>
>>> 
>>> 
>>> On 21.11.2014, at 19:08, Eliot Miranda <eliot.miranda at gmail.com <mailto:eliot.miranda at gmail.com>> wrote:
>>>> I think I'll go with
>>>> 
>>>> Float
>>>> |
>>>> +------- BoxedDouble
>>>> |
>>>> +——— SmallDouble
>>> 
>>> Sounds okay. I just had another thought: use "Float64" instead of "Double". That is how JavaScript names it, and I like how it communicates exactly what it is without having to implicitly know about the IEEE standard's nomenclature. Also, with the digits in the name it screams "low level", and would easily extend to 32 and 128 bit floats.
>>> 
>>> 
>>> Float
>>> |
>>> +------- BoxedFloat64
>>> |
>>> +——— SmallFloat64
> 
> (only half tongue-in-cheek) Should SmallFloat61 have been considered?

No!  :-). Two reasons, a) if you send at: to a SmallFloat64 you get the bits you'd expect, so it feels like a 64-bit Float, b) the VM could use 62 bits if it wanted.

Or, to out it a different way, in general putting implementation details in the name is a bad idea, no?  The name reflects its semantics (an immutable 64-bit double-precision floating-point value).


> cheers -ben

Eliot (phone)


More information about the Vm-dev mailing list