-
Notifications
You must be signed in to change notification settings - Fork 17
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
fix: fix extended-algorithm accuracy problem #117
Conversation
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.
我暂时没有问题了
精度四则运算,参考 https://github.com/nefe/number-precision 做法。目前转整数再除的方法可能也能达到,但是感觉有点非主流了。 |
https://github.com/nefe/number-precision/blob/master/src/index.ts#L70 好像也是这么做的? |
还真是的~ |
之前的 fix 虽然解决了间隔大小不一致的问题,但是对更小的小数值会出错(例如0.0001),原因是处理浮点数计算问题的算法不够严谨,在这里做出修正。