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

JS:计算精度问题 #68

Open
smileyby opened this issue May 25, 2021 · 0 comments
Open

JS:计算精度问题 #68

smileyby opened this issue May 25, 2021 · 0 comments
Labels

Comments

@smileyby
Copy link
Owner

0.1 + 0.2 !== 0.3 true
但我们知道JS对整数的计算是没有问题的,所以当我要要计算小数的时候。全部转成整数计算然后再整除相应的倍数即可

@smileyby smileyby added the JavaScript ☀️ JavaScript label May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant