浮点数计算误差
作者:互联网
做个笔记,几个wiki还有stackoverflow的回答串联起来理解
1) https://en.wikipedia.org/wiki/Floating-point_arithmetic#Accuracy_problems
3) https://en.wikipedia.org/wiki/Single-precision_floating-point_format
4) https://en.wikipedia.org/wiki/Round-off_error
5) https://en.wikipedia.org/wiki/Machine_epsilon
几个原则:
1)避免超大数和超小数之间的运算;
2)大量重复和累计运算会引入误差;
3)根据算法本身特点,因地制宜选用合适的数据类型,例如矩阵求逆,微分近似求导,用double型。否则误差可能很大。
标签:wiki,en,point,浮点数,wikipedia,计算误差,https,org 来源: https://www.cnblogs.com/ShaneZhang/p/12410993.html