How to trace a NaN in C++

后端 未结 4 431
生来不讨喜
生来不讨喜 2020-12-05 00:17

I am going to do some math calculations using C++ . The input floating point number is a valid number, but after the calculations, the resulting value is NaN. I would like

4条回答
  •  执笔经年
    2020-12-05 01:11

    In Visual Studio you can use the _controlfp function to set the behavior of floating-point calculations (see http://msdn.microsoft.com/en-us/library/e9b52ceh(VS.80).aspx). Maybe there is a similar variant for your platform.

提交回复
热议问题