Skip to content

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

@Zabrane

Description

@Zabrane

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions