[erlang-patches] Float endianness in 15B

Gustav Simonsson gustav@REDACTED
Fri Mar 30 15:08:16 CEST 2012


Hi Michael,

Unfortunately we do not yet have an ARM machine in our daily builds & tests.
For some time we have discussed adding ARM to our test cluster, until then
we'll just add this one in our patch notes, preparing it for future testing.

As for the commit itself there was some trailing whitespaces and a dot 
at the end of
the commit message. A review of the actual code will be done when we get 
hold of
an ARM machine for testing.

Thank you for the contribution!

Regards,
Gustav Simonsson
Erlang/OTP team



On 2012-03-23 09:20, Michael Sperber wrote:
> On certain ARM machines, there's a problem with float endianness, which
> has been reported many times before.  Symptons:
>
> io_lib:write(1.0).
> "0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005299808824"
>
> The problem is *not* that the ARM is not using IEEE 754, as is inferred
> here:
>
> http://erlang.org/pipermail/erlang-questions/2008-October/039148.html
>
> The ARM uses IEEE 754, but the two 32-bit words in the FP
> representation are swapped wrt. Erlang's assumptions.
>
> The fix to the source code is very simple, but the associated autoconf
> hackery is a bit more extensive.
>
> Such a fix is here:
>
> git fetch git://github.com/bjorng/otp.git double_middle_endian
> https://github.com/mikesperber/otp/compare/double_middle_endian
> https://github.com/mikesperber/otp/compare/double_middle_endian.patch
>
> (This is the first time I'm submitting a fix to Erlang, and I needed our
> resident git ninja to help me set up, so I hope you'll forgive me if I
> did something wrong - let me know.)
>




More information about the erlang-patches mailing list