Trapping quiet NaN

前端 未结 2 958
误落风尘
误落风尘 2021-02-04 07:02

I have an application where some component occasionally inserts a qNaN in a large data stream, which then invalidates the entire processing (FFT on a vector containing a single

2条回答
  •  无人及你
    2021-02-04 07:45

    I doubt there's a way to put a data breakpoint all over the memory to catch all NaNs.

    I'd look for the code that inserts into the vector and test for NaN there:

    if ( x != x )
        assert(!"NaN detected");
    

提交回复
热议问题