We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
参考链接
双精度为存放1位为符号,11位表示指数,52位表示小数。 指数偏移量:指数偏移量公式: 27.5 转换为二进制11011.1 11011.1转换为科学记数法 符号位0为正数1为负数 指数位e+ 或者e- 1023+/-e 这里e为4+ 小数位10111补气52为最后为 0100 0000 0011 1011 1000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0.10000000000000000555.toPrecision(16) //0.1000000000000000 去掉末尾的零后正好为0.1
0.10000000000000000555.toPrecision(16) //0.1000000000000000 去掉末尾的零后正好为0.1
toPrecision() 把浮点数变成整数,然后再除去基数。0.1+0.23 === (10 + 23) / 100
The text was updated successfully, but these errors were encountered:
No branches or pull requests
参考链接
JS存放数字是双精度
双精度为存放1位为符号,11位表示指数,52位表示小数。
指数偏移量:指数偏移量公式:
27.5 转换为二进制11011.1
11011.1转换为科学记数法
符号位0为正数1为负数
指数位e+ 或者e- 1023+/-e 这里e为4+
小数位10111补气52为最后为
0100 0000 0011 1011 1000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0.10000000000000000555.toPrecision(16) //0.1000000000000000 去掉末尾的零后正好为0.1
恢复方式
toPrecision()
把浮点数变成整数,然后再除去基数。0.1+0.23 === (10 + 23) / 100
The text was updated successfully, but these errors were encountered: