Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erlang/OTP 27, +0.0 will no longer be exactly equal to -0.0 #60

Open
Zabrane opened this issue Sep 23, 2023 · 0 comments
Open

Erlang/OTP 27, +0.0 will no longer be exactly equal to -0.0 #60

Zabrane opened this issue Sep 23, 2023 · 0 comments

Comments

@Zabrane
Copy link

Zabrane commented Sep 23, 2023

Hi @massemanet
Would you be able to fix the new strict [float checking](Erlang/OTP 27, +0.0 will no longer be exactly equal to -0.0)?

Eper can't compile anymore with Erlang 26.1 as you can see:

===> Compiling src/dtopConsumer.erl failed
src/dtopConsumer.erl:121:7: matching on the float 0.0 will no longer also match -0.0 in OTP 27. If you specifically intend to match 0.0 alone, write +0.0 instead.

The fix is very simple IMHO:

    case lks(beam_user,Sys,1)+lks(beam_kernel,Sys,0) of
      +0.0 -> 1;
      C -> C
    end,

Many thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant