Problem with 64 bit FP under ARM
Tue Aug 26 10:10:07 CEST 2003
Martin Sandiford <ms@REDACTED> writes:
> Hello all,
> I have a problem with 64 bit floating point numbers on an embedded
> SA1110 based machine running under Linux.
> A summary of the problem:
> (Running under Linux on x86):
> 1> <<1.0:64/float>>.
> (Pretty much as expected for a little endian machine)
This is the expected result on ANY machine. The default endian
is big, so <<1.0:64/float>> is just shorthand for <<1.0:64/big-float>>.
To get the native ordering, you could use <<1.0:64/native-float>>.
> I'm not an ARM expert, so I can only assume that the correct
> representation for a double on ARM is with the quads swapped with
> respect to "normal" LE ordering. Does anyone here know if this is the
> case? I'm thinking it maybe could be a problem with the FP emulator?
> (There is no FPU on this board).
I don't know anything about the ARM.
It would be interesting if you could post the result of:
That should show exactly how floating point numbers are stored
Björn Gustavsson Ericsson Utvecklings AB
+46 8 727 56 87 125 25 Älvsjö
More information about the erlang-questions