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

Rand example issue? #8346

Closed
lhoguin opened this issue Apr 5, 2024 · 4 comments
Closed

Rand example issue? #8346

lhoguin opened this issue Apr 5, 2024 · 4 comments
Assignees
Labels
bug Issue is reported as a bug team:PS Assigned to OTP team PS
Milestone

Comments

@lhoguin
Copy link
Contributor

lhoguin commented Apr 5, 2024

Describe the bug
https://github.com/erlang/otp/blob/master/lib/stdlib/src/rand.erl#L585-L601

I believe the match on 0.0 is going to produce a warning or an error asking to use +0.0 or -0.0.

Affected versions
All with the newly added warning/error.

@lhoguin lhoguin added the bug Issue is reported as a bug label Apr 5, 2024
@juhlig
Copy link
Contributor

juhlig commented Apr 5, 2024

The example is wrong in general (double end), but aside from that, yes, you're right.

@rickard-green rickard-green added the team:PS Assigned to OTP team PS label Apr 8, 2024
@RaimoNiskanen
Copy link
Contributor

You are quite right. I will fix this while reworking the rand module documentation after the Markdown conversion in OTP 27.

@RaimoNiskanen RaimoNiskanen added this to the OTP-27.0 milestone Apr 26, 2024
@RaimoNiskanen
Copy link
Contributor

You can see the new documentation here:
https://erlang.org/documentation/doc-15.0-rc3/lib/stdlib-6.0/doc/html/rand.html

@lhoguin
Copy link
Contributor Author

lhoguin commented May 2, 2024

Looks good! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug team:PS Assigned to OTP team PS
Projects
None yet
Development

No branches or pull requests

5 participants