Do-s and Don't-s for floating point arithmetic?

后端 未结 7 1910
臣服心动
臣服心动 2021-02-13 16:32

What are some good do-s and don\'t-s for floating point arithmetic (IEEE754 in case there\'s confusion) to ensure good numerical stability and high accuracy in your results?

7条回答
  •  别跟我提以往
    2021-02-13 16:45

    My "main weapon" for avoiding floating-point pitfalls is to have a firm grasp on the way they work. I think Chris Hecker explains the basics pretty well.

提交回复
热议问题