Floating point exception when reading real values from an input file

ε祈祈猫儿з 提交于 2019-12-02 00:02:00

The floating point exceptions inexact and denormal happen way too often and during legitimate use of floating point arithmetic is inexact. Almost all real-world floating point arithmetic. Even reading a single number from file or keyboard, because not all decimal numbers can be stored exactly in binary. Denormal happens slightly less often, but the use can still be legitimate.

Therefore it is not useful to trap these floating point exceptions. Even underflow is debatable. I would not trap it by default, but I can see its usefulness.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!