Skip to content

Add the largest number possible to generate #284

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

Closed
wants to merge 1 commit into from

Conversation

ldetwiler666
Copy link

It does not state any maximum value that you can generate to. For example, I could write Random(123456789) but I don't think its capable of generating up to 123 million different numbers. So, what is the biggest number that can be generated?

It does not state any maximum value that you can generate to. For example, I could write Random(123456789) but I don't think its capable of generating up to 123 million different numbers. So, what is the biggest number that can be generated?
@per1234
Copy link
Collaborator

per1234 commented Dec 13, 2017

I think this would be solved by specifying the parameter types (#15). Then the max value could be found by consulting the reference page for that type.

FYI, in the future when you want to report an error or a request an improvement without knowing the specific fix that needs to be made, it would be more appropriate and easier for you to submit an issue report for this sort of thing rather than a pull request:
https://github.com/arduino/reference-en/issues

@SimonePDA
Copy link

The random number generator function creates values that should fit the range of the data type of the variable into which the value is stored. The max value should be chosen properly to avoid inconsistencies.
The max value, in any case, can't exceed the 32 bit representation limit. I'll add a note to random() to explain this.

thanks for pointing it out :)

@SimonePDA SimonePDA closed this Dec 15, 2017
@SimonePDA SimonePDA mentioned this pull request Dec 15, 2017
per1234 pushed a commit to per1234/reference-en that referenced this pull request May 7, 2022
…ription

Remove leftover English fragment from the shiftOut() example description
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

Successfully merging this pull request may close these issues.

3 participants