We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug The following code:
f(_V0, _V0) -> -0.0; f(_, _) -> 0.0. wrapper() -> io:write(f(ok, [])).
prints -0.0 whereas I would expect 0.0
-0.0
0.0
Affected versions
Additional context Compiling the code with +no_fold +no_ssa_opt makes it print 0.0 as expected.
+no_fold +no_ssa_opt
The text was updated successfully, but these errors were encountered:
We're aiming to fix this in OTP 27 by making matching and =:= distinguish between +0.0 and -0.0:
=:=
+0.0
https://erlangforums.com/t/in-erlang-otp-27-0-0-will-no-longer-be-exactly-equal-to-0-0/2586
Sorry, something went wrong.
Fixed in OTP 27, thanks for your report :)
bjorng
jhogberg
No branches or pull requests
Describe the bug
The following code:
prints
-0.0
whereas I would expect0.0
Affected versions
Additional context
Compiling the code with
+no_fold +no_ssa_opt
makes it print0.0
as expected.The text was updated successfully, but these errors were encountered: