On Mon, Jun 21, 2010 at 5:16 PM, Henrik Sperre Johansen <henrik.s.johansen@veloxit.no> wrote:

 On 20.06.2010 22:11, Eliot Miranda wrote:
While the VMs convert float order automatically on load they do require special accessing primitives Float>>basicAt: & Float>>basicAt:put: that undo the reversal and answer Float contents in big-endian order so that e.g. Float>>hash is unchanged.  The methods assume these primitives can fail, allowing the code to be used on current Squeak VMs.


Should also note, Float divisions by zero now return + / - Infinity rather than raising ZeroDivide errors.
15.0 / 0  Infinity
-15.0 / 0.0 -Infinity

which is clearly a bug in Cog.  But I'd like to provide a flag/image-header-bit to allow one to specify either behaviour.  i.e. fail float primitives that return NaNs or Infs, or return the relevant IEEE Inf/NaN.  Andreas and I have just discussed this and he points out that while under ieee Inf and non-NaN results are bit-identical across platforms, NaNs are  not.  So for Croquet one really needs the code generator to arrange that float primitives that do return NaNs normalise those NaNs to a small set (e.g. a pair of a single +ve NaN & a single -ve NaN).

cheers,
Eliot


Cheers,
Henry