floating point - What is difference between quiet NaN and signaling NaN? -
i have read floating-point , understand nan results operations. can't understand these concepts exactly. difference?
which 1 can produced during c++ programming? programmer, write program cause snan?
when operation results in quiet nan, there no indication unusual until program checks result , sees nan. is, computation continues without signal floating point unit (fpu) or library if floating-point implemented in software. signalling nan produce signal, in form of exception fpu. whether exception thrown depends on state of fpu.
c++11 adds few language controls on floating-point environment , provides standardized ways create , test nans. however, whether controls implemented not standardized , floating-point exceptions not typically caught same way standard c++ exceptions.
in posix/unix systems, floating point exceptions typically caught using handler sigfpe.
Comments
Post a Comment