gcc - Where is the source code for isnan? -


because of layers of standards, include files c++ rats nest. trying figure out __isnan calls, , couldn't find anywhere actual definition.

so compiled -s see assembly, , if write:

#include <ieee754.h>  void f(double x) {   if (__isinf(x) ...    if (__isnan(x)) ... } 

both of these routines called. see actual definition, , possibly refactor things inline, since should bit comparison, albeit 1 hard achieve when value in floating point register.

anyway, whether or not it's idea, question stands: source code __isnan(x)?

glibc has versions of code in sysdeps folder each of systems supports. 1 you’re looking in sysdeps/ieee754/dbl-64/s_isnan.c. found git grep __isnan.

(while c++ headers include code templates, functions c library not, , have inside glibc or whichever.)


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -