[erlang-questions] OTP float error on ARM

Tony Finch <>
Wed Oct 15 13:16:18 CEST 2008


On Wed, 15 Oct 2008, WS Dao wrote:

> I cross-compiled OTP R12B4 for my ARM9 platform (S3C2410, kernel 2.4.18)
> When I run erl on arm, float error occurs:
> # ./erl
> Eshell V5.6.4  (abort with ^G)
> 1> 3+5.
> 8
> 2> 3.0.
> 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005307579804
> 3> 3.0+4.0.
> 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000531405562
> 4>
>
> My toolchain is gcc 3.4.5.  I'd wrote a c test program and cross-compile it,
> no float problems found.
>
> Any suggestion?

I wonder if this is to do with the ARM FPA middle endian double precision
floating point memory layout?

Tony.
-- 
f.anthony.n.finch  <>  http://dotat.at/
FISHER: CYCLONIC BECOMING WEST 5 OR 6, OCCASIONALLY 7. MODERATE OR ROUGH. RAIN
THEN SHOWERS. MODERATE OR GOOD.



More information about the erlang-questions mailing list