-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Clean up mod1 #14140
Clean up mod1 #14140
Conversation
@@ -185,6 +185,13 @@ end | |||
@deprecate iround(x) round(Integer,x) | |||
@deprecate iround{T}(::Type{T},x) round(T,x) | |||
|
|||
# rem1 is inconsistent for x==0: The result should both have the same |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be in the "0.5 deprecations" section at the end, not mixed in with the 0.4 deprecations
bc69999
to
a0b956c
Compare
Updated. |
63e3ccd
to
3173fe3
Compare
@tkelman is this good to go? |
No, the docs need to be populated into the RST |
Wonderful, a chance to use my new label. |
3173fe3
to
f2a4255
Compare
Updated documentation. |
@@ -164,11 +172,29 @@ Mathematical Operators | |||
|
|||
The floored quotient and modulus after division. Equivalent to ``(fld(x,y), mod(x,y))``\ . | |||
|
|||
.. function:: fld1(x,m) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it actually makes a difference but I think we usually put space after commas in argument list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So do I usually, but here I thought that this would make the tuple less readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be clear, I'm talking about the exact line I'm commenting on .. function:: fld1(x,m)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
signature in rst needs to be consistent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rst still needs a space
f2a4255
to
6b85753
Compare
@@ -5266,6 +5266,8 @@ doc""" | |||
%(x, y) | |||
|
|||
Remainder from Euclidean division, returning a value of the same sign as `x`, and smaller in magnitude than `y`. This value is always exact. | |||
|
|||
x == div(x,m)*m + rem(x,m) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's m
?
6b85753
to
8505211
Compare
Corrected documentation. |
@@ -3265,7 +3265,7 @@ tril!(M, k) | |||
doc""" | |||
divrem(x, y) | |||
|
|||
The quotient and remainder from Euclidean division. Equivalent to `(x÷y, x%y)`. | |||
The quotient and remainder from Euclidean division. Equivalent to `div(x,y), rem(x,y))` or `(x÷y, x%y)`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing open paren
Implement fld1 and fldmod1. Add test cases. Deprecate rem1. Simplify (the only) use case in Base. Update documentation.
8505211
to
958a566
Compare
I'm learning a lot about the doc system here. I don't think that's the goal here, though. Thanks for the pointers and the patience. |
yes, it's an open todo to make the docsystem less fiddly, the current system with partially autogenerated rst is not great. docs lgtm now. not thrilled about adding more exports but i guess this is okay. |
Note that |
Implement fld1 and fldmod1.
Add test cases.
Deprecate rem1.