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

Johannes Weißl jargon@REDACTED
Thu May 30 10:07:10 CEST 2013


Hello,

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>>

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

https://github.com/weisslj/otp/compare/erlang:maint...fix-float-match-middle-endian
https://github.com/weisslj/otp/compare/erlang:maint...fix-float-match-middle-endian.patch


Greetings,

Johannes Weißl



More information about the erlang-patches mailing list