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

mod1 / rem1 documentation is inconsistent #8108

Closed
eschnett opened this issue Aug 24, 2014 · 2 comments
Closed

mod1 / rem1 documentation is inconsistent #8108

eschnett opened this issue Aug 24, 2014 · 2 comments
Labels
domain:docs This change adds or pertains to documentation

Comments

@eschnett
Copy link
Contributor

The documentation for mod1(x,m) and rem1(x,m) is inconsistent for the case where m is negative: The interval (0,m] does not make sense in this case.

Also, given the implementation of rem1, it seems that the numerator x is assumed to be positive? For example, rem1(0,10) returns 0, and negative x lead to negative results.

@mschauer
Copy link
Contributor

#5570 "mod1(x,y) doesn't work at all for unsigned x,y when x>y. Moreover fld1(x,y) gives rather less useful results for signed x<=0 and incorrect results for unsigned x=0."

@jiahao jiahao added the domain:docs This change adds or pertains to documentation label Jan 6, 2015
jiahao added a commit that referenced this issue Jan 6, 2015
Restore old implementation of mod1 that was overwritten in
3842422

Adds test of mod1 behavior from #5570

Note: #5570 is not fixed for fld1, rem1. The documentation bug of #8108
is not fixed.
@jiahao jiahao mentioned this issue Jan 6, 2015
jiahao added a commit that referenced this issue Jan 6, 2015
Restore old implementation of mod1 that was overwritten in
3842422

Adds test of mod1 behavior from #5570

Note: #5570 is not fixed for fld1, rem1. The documentation bug of #8108
is not fixed.
jiahao added a commit that referenced this issue Jan 13, 2015
Restore old implementation of mod1 that was overwritten in
3842422

Adds test of mod1 behavior from #5570

Note: #5570 is not fixed for fld1, rem1. The documentation bug of #8108
is not fixed.
jiahao added a commit that referenced this issue Jan 17, 2015
Restore old implementation of mod1 that was overwritten in
3842422

Adds test of mod1 behavior from #5570

Note: #5570 is not fixed for fld1, rem1. The documentation bug of #8108
is not fixed.
@eschnett
Copy link
Contributor Author

eschnett commented Dec 3, 2015

This should be fixed by #14140: mod1's documentation was corrected in #9643, and rem1 is deprecated in favour of mod1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:docs This change adds or pertains to documentation
Projects
None yet
Development

No branches or pull requests

4 participants