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

Documentation rand module example fails because of misspelled algorithm name #8720

Closed
ThomasArts opened this issue Aug 14, 2024 · 1 comment · Fixed by #8745
Closed

Documentation rand module example fails because of misspelled algorithm name #8720

ThomasArts opened this issue Aug 14, 2024 · 1 comment · Fixed by #8745
Assignees
Labels
bug Issue is reported as a bug help wanted Issue not worked on by OTP; help wanted from the community team:PS Assigned to OTP team PS

Comments

@ThomasArts
Copy link
Contributor

Describe the bug
Working with OTP-26-2.5 reading the documentation of the rand module at https://www.erlang.org/docs/26/man/rand

The documentations states as second example:

_ = rand:seed(exs928ss),
R2 = rand:uniform(),

When performing this in the shell I get:

Erlang/OTP 26 [erts-14.2.5] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]

Eshell V14.2.5 (press Ctrl+G to abort, type help(). for help)
1> _ = rand:seed(exs928ss).
** exception error: no function clause matching rand:mk_alg(exs928ss) (rand.erl, line 706)
     in function  rand:seed_s/2 (rand.erl, line 297)
     in call from rand:seed/1 (rand.erl, line 265)

Since this algorithm is not mentioned any more, but exro928ss is, I assume that the update is to add those two letters, but I feel unfamiliar with whether that indeed is the intention of that example.

To Reproduce
Open a shell and type the example.

Expected behavior
Expecting the behaviour as for exsss, getting some return value.

Affected versions
OTP-26.2.5

Additional context
The same algorithm is used in other example as well and fails there similarly.

@ThomasArts ThomasArts added the bug Issue is reported as a bug label Aug 14, 2024
@garazdawi garazdawi added the team:PS Assigned to OTP team PS label Aug 14, 2024
@RaimoNiskanen
Copy link
Contributor

Yes you are right. It should be exro928ss. exs928ss has never existed other than as an incorrect example probably created by inserting 928 into the wrong algorithm name. Good find!

@IngelaAndin IngelaAndin added the help wanted Issue not worked on by OTP; help wanted from the community label Aug 20, 2024
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 help wanted Issue not worked on by OTP; help wanted from the community team:PS Assigned to OTP team PS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants