Skip to content

Non-equation in random.uniform #115921

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
pochmann3 opened this issue Feb 25, 2024 · 1 comment
Closed

Non-equation in random.uniform #115921

pochmann3 opened this issue Feb 25, 2024 · 1 comment
Labels
docs Documentation in the Doc dir easy

Comments

@pochmann3
Copy link
Contributor

pochmann3 commented Feb 25, 2024

Documentation

The random.uniform doc says:

the equation a + (b-a) * random()

That's not an equation. Just an expression.

The page mentions "equation" twice more right above, but I think those refer to actual equations like the pdf(x) = ... for random.gammavariate and are thus correct.

Linked PRs

@pochmann3 pochmann3 added the docs Documentation in the Doc dir label Feb 25, 2024
@terryjreedy
Copy link
Member

Yes, equation should be expression. For a uniform distribution, the equation is pdf = 1/(b-a) on [a, b], 0 elsewhere, so that the integral over the real line is 1.0. PR soon.

terryjreedy added a commit to terryjreedy/cpython that referenced this issue Feb 26, 2024
terryjreedy added a commit that referenced this issue Feb 26, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 26, 2024
…honGH-115927)

In uniform function entry.
(cherry picked from commit de0b4f9)

Co-authored-by: Terry Jan Reedy <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 26, 2024
…honGH-115927)

In uniform function entry.
(cherry picked from commit de0b4f9)

Co-authored-by: Terry Jan Reedy <[email protected]>
terryjreedy added a commit that referenced this issue Feb 26, 2024
…-115927) (#115928)

In uniform function entry.
(cherry picked from commit de0b4f9)

Co-authored-by: Terry Jan Reedy <[email protected]>
terryjreedy added a commit that referenced this issue Feb 26, 2024
…-115927) (#115929)

In uniform function entry.
(cherry picked from commit de0b4f9)

Co-authored-by: Terry Jan Reedy <[email protected]>
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this issue Mar 4, 2024
adorilson pushed a commit to adorilson/cpython that referenced this issue Mar 25, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this issue Apr 17, 2024
LukasWoodtli pushed a commit to LukasWoodtli/cpython that referenced this issue Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir easy
Projects
None yet
Development

No branches or pull requests

2 participants