diff options
author | Yaakov Selkowitz <yselkowi@redhat.com> | 2016-04-04 15:49:31 -0500 |
---|---|---|
committer | Yaakov Selkowitz <yselkowi@redhat.com> | 2016-04-05 08:49:44 -0500 |
commit | cd84d1c2d06ad0a30f3aebb8ff86727df67ba0da (patch) | |
tree | aa9a1f9d83b8963439df7a16d05c10b82dced7cf /newlib/libm/common/s_isnan.c | |
parent | 8d67708a08082df4b077ee35dcfd4947c0a5b1f3 (diff) | |
download | cygnal-cd84d1c2d06ad0a30f3aebb8ff86727df67ba0da.tar.gz cygnal-cd84d1c2d06ad0a30f3aebb8ff86727df67ba0da.tar.bz2 cygnal-cd84d1c2d06ad0a30f3aebb8ff86727df67ba0da.zip |
math: update isinf/isnan function comments after move to math.h
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Diffstat (limited to 'newlib/libm/common/s_isnan.c')
-rw-r--r-- | newlib/libm/common/s_isnan.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/newlib/libm/common/s_isnan.c b/newlib/libm/common/s_isnan.c index 3ce5aa669..64deacd66 100644 --- a/newlib/libm/common/s_isnan.c +++ b/newlib/libm/common/s_isnan.c @@ -53,7 +53,7 @@ ANSI_SYNOPSIS int isnormal(real-floating <[x]>); [Archaic SUSv2 functions:] - #include <ieeefp.h> + #include <math.h> int isnan(double <[arg]>); int isinf(double <[arg]>); int finite(double <[arg]>); @@ -142,7 +142,7 @@ o- and <<isinf>> are macros that operate on multiple types of floating-point. The SUSv2 standard declares <<isnan>> as a function taking double. Newlib has decided to declare - them both as macros in math.h and as functions in ieeefp.h to + them both as functions and as macros in math.h to maintain backward compatibility. RETURNS @@ -154,9 +154,11 @@ The isnan macro returns nonzero if <[x]> is an NaN, else 0.@* The isnormal macro returns nonzero if <[x]> has a normal value, else 0. PORTABILITY -math.h macros are C99, POSIX. +math.h macros are C99, POSIX.1-2001. -ieeefp.h funtions are outdated and should be avoided. +The functions originate from BSD; isnan was listed in the X/Open +Portability Guide and Single Unix Specification, but was dropped when +the macro was standardized in POSIX.1-2001. QUICKREF isnan - pure @@ -179,8 +181,8 @@ QUICKREF * The C99 standard dictates that isnan is a macro taking * multiple floating-point types while the SUSv2 standard * notes it is a function taking a double argument. Newlib - * has chosen to implement it as a macro in <math.h> and - * declare it as a function in <ieeefp.h>. + * has chosen to declare it both as a function and as a macro in + * <math.h> for compatibility. */ #include "fdlibm.h" |