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
第672天 请说说IEEE 754标准指的是什么?
3+1官网
我也要出题
The text was updated successfully, but these errors were encountered:
IEEE 754, IEEE二进制浮点数算术标准,是使用最广泛的浮点数运算标准。很多语言都采用了该标准,包含JavaScript、Java等。但是该计算标准有一个缺陷,就是浮点数相加可能会出现误差,比如:
所以,在编写程序的时候,尽量不要使用浮点数的算式来进行比较,很容易出错:
float a = 0.15 + 0.15 float b = 0.1 + 0.2 if(a == b) // can be false! if(a >= b) // can also be false!
参考:
Sorry, something went wrong.
No branches or pull requests
第672天 请说说IEEE 754标准指的是什么?
3+1官网
我也要出题
The text was updated successfully, but these errors were encountered: