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

Mention integers in mod1 docstring #41448

Merged
merged 2 commits into from
Jul 4, 2021
Merged

Conversation

mcabbott
Copy link
Contributor

@mcabbott mcabbott commented Jul 2, 2021

The present docstring for mod1 explains it as giving a result in the closed-right interval (0, y], instead of [0, y) for mod. That's focused on the real numbers, but it's then a bit of a mystery why this is called mod1. I think that comes from the integers, where it returns something in 1:y instead of in 0:y-1, thus matching OneTo(y). So I added a paragraph saying that.

And I've extended the examples to, I hope, make them explain what it does even if you didn't read the formal version.

@dkarrasch dkarrasch added the docs This change adds or pertains to documentation label Jul 2, 2021
base/operators.jl Outdated Show resolved Hide resolved
base/operators.jl Outdated Show resolved Hide resolved
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
@vtjnash vtjnash added the merge me PR is reviewed. Merge when all tests are passing label Jul 2, 2021
@dkarrasch dkarrasch merged commit 69c8e0b into JuliaLang:master Jul 4, 2021
@dkarrasch dkarrasch removed the merge me PR is reviewed. Merge when all tests are passing label Jul 4, 2021
@mcabbott mcabbott deleted the mod1_doc branch July 4, 2021 13:49
johanmon pushed a commit to johanmon/julia that referenced this pull request Jul 5, 2021
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
simeonschaub added a commit that referenced this pull request Jul 6, 2021
This currently causes the whitespace check to fail.
@simeonschaub
Copy link
Member

This seems to have accidentally added trailing whitespace. @staticfloat @DilumAluthge Any ideas what happened to the whitespace job?

simeonschaub added a commit that referenced this pull request Jul 6, 2021
This currently causes the whitespace check to fail.
simeonschaub added a commit to goggle/julia that referenced this pull request Jul 6, 2021
This currently causes the whitespace check to fail.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants