Due to the layers of standards, the included files for C ++ are a rat nest. I tried to find out what actually causes __isnan, and could not find anywhere with the actual definition.
So, I just compiled with -S to see the assembly, and if I write:
#include <ieee754.h>
void f(double x) {
if (__isinf(x) ...
if (__isnan(x)) ...
}
Both of these procedures are called. I would like to see the actual definition and possibly reorganize things like the built-in, as this should be just a comparison, although it is difficult to achieve when the value is in the floating point register.
In any case, is this a good idea, the question is: WHERE is the source code for __isnan(x)?
source
share