-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
Not Quite "High Precision" #150
Comments
Thank you for your feedback.
Insect does not use JavaScripts
As stated in the README/FAQ, the internal result is accurate up to 30 digits, so you don't actually loose the
The problem is that Insect only shows 6 significant digits. This is also documented in the open issue #54 which reports the same problem. There is a plan to make this user-configurable (see #107). Given that we use a numeric type with 30 digits, I hope you feel comfortable with me calling Insect a "high precision" numeric calculator. |
Huh, I guess I didn't read everything as thoroughly as I probably should have. Sorry about that. I'll have to take a look at how you got the 30 digit numeric type... that kinda interests me! |
No worries! 😃
Insect uses this library: https://github.com/MikeMcl/decimal.js/ |
Playing around in the interactive editor, I got a wrong answer that I kinda expected:
Sure, I'm adding one tenth to 100 billion, and it's quite insignificant in compare, but I should be able to do this if I'm using a "high precision" calculator. I think the only way to fix this is to stop using IEEE floating point numbers, which is unfortunately the only number type in JavaScript.
The text was updated successfully, but these errors were encountered: