You could enable floating point exceptions – see glibc Control Functions – then you’ll get a SIGFPE
when your NaN
value is produced
More Related Contents:
- Why does changing 0.1f to 0 slow down performance by 10x?
- Can I set a breakpoint on ‘memory access’ in GDB?
- Debugging core files generated on a Customer’s box
- Why does printf() promote a float to a double?
- C++ floating point precision [duplicate]
- Floating point format for std::ostream
- How do I print the elements of a C++ vector in GDB?
- Inspecting standard container (std::map) contents with gdb
- Convert float to string with precision & number of decimal digits specified?
- double or float, which is faster? [duplicate]
- Floating point equality and tolerances
- Why floating point value such as 3.14 are considered as double by default in MSVC?
- Is floating point addition commutative in C++?
- Run an Application in GDB Until an Exception Occurs
- Comparing floating point number to zero
- Is there any way to set a breakpoint in gdb that is conditional on the call stack?
- Compare double to zero using epsilon
- C/C++ NaN constant (literal)?
- How to alter a float by its smallest increment (or close to it)?
- Floating point Endianness?
- Avoiding denormal values in C++
- Cast to int vs floor
- Matlab vs C++ Double Precision
- Is there a functional difference between “2.00” and “2.00f”?
- Can an integer be NaN in C++?
- traceback a pointer in c++ code gdb
- Does setprecision in c++ round? If so why am I seeing this?
- How is floating point conversion actually done in C++?(double to float or float to double)
- How to force GCC to assume that a floating-point expression is non-negative?
- Is there any advantage to using pow(x,2) instead of x*x, with x double?