How deterministic is floating point inaccuracy?

后端 未结 10 1462
长发绾君心
长发绾君心 2020-11-27 06:51

I understand that floating point calculations have accuracy issues and there are plenty of questions explaining why. My question is if I run the same calculation twice, can

10条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-27 07:02

    Also, while Goldberg is a great reference, the original text is also wrong: IEEE754 is not gaurenteed to be portable. I can't emphasize this enough given how often this statement is made based on skimming the text. Later versions of the document include a section that discusses this specifically:

    Many programmers may not realize that even a program that uses only the numeric formats and operations prescribed by the IEEE standard can compute different results on different systems. In fact, the authors of the standard intended to allow different implementations to obtain different results.

提交回复
热议问题