-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Potential bug in mod() #2936
Comments
Thanks for reporting. This is caused by the implementation of mathjs/src/plain/number/arithmetic.js Lines 159 to 171 in ebf9287
To fix this for real, we should pull in the higher level function floor of mathjs, which uses The same issue occurs with Anyone interested to help out improve |
@LloydLS Can I work on it? |
Thanks for your offer Madhu, that would be great. |
Thanks for your PR #2940 @Madhu003 . I think we need to think through some steps before we can finish up this PR:
What do you think? |
Hi, @josdejong I've gone through the issue and improved the precision logic of
Expecting your reply. |
Thanks for your PR Praise! About your two questions: I think the On a side note: we do want to implement a separate |
Fixed now in |
Hi,
Describe the bug
mod()
sometimes returns an unexpected result, presumably due to round-off errors.To Reproduce
Please compare:
with
Version tested: 11.8.0
Best regards,
The text was updated successfully, but these errors were encountered: