what languages expose IEEE 754 traps to the developer?

后端 未结 4 1038
天命终不由人
天命终不由人 2021-02-14 22:38

I\'d like to play with those traps for educational purpose.

A common problem with the default behavior in numerical calculus is that we \"miss\" the Nan (or +-inf) that

4条回答
  •  深忆病人
    2021-02-14 23:06

    I'm unsure of what the standard is, but I can tell you what I've seen from experience as it may be useful. I have coded in C++ and NaN's are sometimes my worst nightmare. They appear silently and propogate through the computation all the way to the end, until I just have useless output. I've often had to create additional code to specifically detect the NaN-causing circumstances. I'm using Visual C++ 2008, so I expect that it'd be following the IEEE standard in this manner.

提交回复
热议问题