[erlang-patches] Fix matching floating point on middle-endian machines

Johannes Weißl <>
Fri Jun 14 17:22:17 CEST 2013

Hello again,

I found and fixed three other occurrences in the code base where the
endianness of doubles matters. After two weeks of testing I'm now fairly
confident that Erlang runs fine on our platform.

All four commits have been pushed to a new branch:

git fetch git://github.com/weisslj/otp.git fix-float-middle-endian



Johannes Weißl

On Thu, May 30, 2013 at 10:07:10AM +0200, Johannes Weißl wrote:
> This patch fixes matching of floating point numbers on middle-endian
> platforms (ARM in my case). The error can be reproduced in QEMU using
> this image: http://people.debian.org/~aurel32/qemu/armel/
> It builds up on Mike Sperbers patch (OTP-10209). Without this patch, the
> float matching tests in bs_match_misc_SUITE fail.
> Here is a simple error example:
> 1> <<_,_,_,_,_,_,_,_>> = <<1.25/float>>.
> <<63,244,0,0,0,0,0,0>>
> 2> <<1.25/float>> = <<63,244,0,0,0,0,0,0>>.
> ** exception error: no match of right hand side value <<63,244,0,0,0,0,0,0>>

More information about the erlang-patches mailing list