-
Notifications
You must be signed in to change notification settings - Fork 742
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
squareRoot() produces incorrect result #276
Comments
No, it shouldn't print that. It should print
What software are you using to check the result? There are limits to sqrt, but I am not sure where they are exactly. I'll look into into it at some point. Thanks for the report. |
Fixed in v9.0.1. Do you have any further details or perhaps code to share regarding the tests that you have performed here? Regardless, thanks again for the report, as this bug also affects my other library decimal.js. Notes: |
@MikeMcl thanks for fixing it! My project Cryptofuzz generates random numbers and performs the same calculation on those numbers in different libraries. Currently about 30 different libraries are supported: https://github.com/guidovranken/cryptofuzz/tree/master/modules The harness code for bignumber.js is here: https://github.com/guidovranken/cryptofuzz/blob/master/modules/bignumber.js/harness.js
Cryptofuzz then compares the result to that of eg. OpenSSL, and alerts you if it finds a discrepancy. What else would you like to know? If you would like to run it yourself, I can make a build script for you. |
Great project! Thanks for the info. I'll take a good look when time permits. |
This prints:
but it should print:
The text was updated successfully, but these errors were encountered: