diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2006-02-27 23:51:28 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2006-02-27 23:51:28 +0000 |
commit | e48682cff514c0480aff58a3e752edf7eb9ff228 (patch) | |
tree | 0e9c096a2b54e60d287d32cec39017b36714871c /newlib/libm/mathfp/s_isnan.c | |
parent | 47a5b664e5095434abe0630008fce5dc9f323130 (diff) | |
download | cygnal-e48682cff514c0480aff58a3e752edf7eb9ff228.tar.gz cygnal-e48682cff514c0480aff58a3e752edf7eb9ff228.tar.bz2 cygnal-e48682cff514c0480aff58a3e752edf7eb9ff228.zip |
2006-02-27 Jeff Johnston <jjohnstn@redhat.com>
* Makefile.am (MATHOBJS_IN_LIBC): Add s_isinfd, sf_isinff,
s_isnand, and sf_isnanf object files.
* Makefile.in: Regenerated.
* libc/include/ieeefp.h: Undef isnan and isinf to avoid
conflict if <math.h> has previously been included.
* libc/include/math.h
* libm/common/Makefile.am: Add new s_isinfd, s_isnand, sf_isinff,
and sf_isnanf files. Also support s_isnan, sf_isnan, s_isinf, and
sf_isinf files which have been moved from math/mathfp directories.
* libm/common/Makefile.in: Regenerated.
* libm/common/s_isinfd.c: New file.
* libm/common/s_isnand.c: Ditto.
* libm/common/sf_isinff.c: Ditto.
* libm/common/sf_isnanf.c: Ditto.
* libm/common/s_isinf.c: Moved from libm/math directory.
* libm/common/s_isnan.c: Ditto.
* libm/common/sf_isinf.c: Ditto.
* libm/common/sf_isnan.c: Ditto.
* libm/math/Makefile.am: Remove isinf and isnan family functions
which have been moved into common directory.
* libm/mathfp/Makefile.am: Ditto.
* libm/math/Makefile.in: Regenerated.
* libm/mathfp/Makefile.in: Ditto.
* libm/math/s_isinf.c: Removed.
* libm/math/s_isnan.c: Ditto.
* libm/math/sf_isinf.c: Ditto.
* libm/math/sf_isnan.c: Ditto.
* libm/mathfp/s_isinf.c: Ditto.
* libm/mathfp/s_isnan.c: Ditto.
* libm/mathfp/sf_isinf.c: Ditto.
* libm/mathfp/sf_isnan.c: Ditto.
Diffstat (limited to 'newlib/libm/mathfp/s_isnan.c')
-rw-r--r-- | newlib/libm/mathfp/s_isnan.c | 124 |
1 files changed, 0 insertions, 124 deletions
diff --git a/newlib/libm/mathfp/s_isnan.c b/newlib/libm/mathfp/s_isnan.c deleted file mode 100644 index 70ac704c3..000000000 --- a/newlib/libm/mathfp/s_isnan.c +++ /dev/null @@ -1,124 +0,0 @@ - -/* @(#)z_isnan.c 1.0 98/08/13 */ - -/* -FUNCTION - <<isnan>>, <<isnanf>>, <<isinf>>, <<isinff>>, <<finite>>, <<finitef>>---test -for exceptional numbers - -INDEX - isnan -INDEX - isinf -INDEX - finite - -INDEX - isnanf -INDEX - isinff -INDEX - finitef - -ANSI_SYNOPSIS - #include <ieeefp.h> - int isnan(double <[arg]>); - int isinf(double <[arg]>); - int finite(double <[arg]>); - int isnanf(float <[arg]>); - int isinff(float <[arg]>); - int finitef(float <[arg]>); - -TRAD_SYNOPSIS - #include <ieeefp.h> - int isnan(<[arg]>) - double <[arg]>; - int isinf(<[arg]>) - double <[arg]>; - int finite(<[arg]>); - double <[arg]>; - int isnanf(<[arg]>); - float <[arg]>; - int isinff(<[arg]>); - float <[arg]>; - int finitef(<[arg]>); - float <[arg]>; - - -DESCRIPTION - These functions provide information on the floating-point - argument supplied. - - There are five major number formats: - o+ - o zero - A number which contains all zero bits. - o subnormal - A number with a zero exponent but a nonzero fraction. - o normal - A number with an exponent and a fraction. - o infinity - A number with an all 1's exponent and a zero fraction. - o NAN - A number with an all 1's exponent and a nonzero fraction. - - o- - - <<isnan>> returns 1 if the argument is a nan. <<isinf>> - returns 1 if the argument is infinity. <<finite>> returns 1 if the - argument is zero, subnormal or normal. - - The <<isnanf>>, <<isinff>> and <<finitef>> functions perform the same - operations as their <<isnan>>, <<isinf>> and <<finite>> - counterparts, but on single-precision floating-point numbers. - -QUICKREF - isnan - pure -QUICKREF - isinf - pure -QUICKREF - finite - pure -QUICKREF - isnan - pure -QUICKREF - isinf - pure -QUICKREF - finite - pure -*/ - - -/****************************************************************** - * isnan - * - * Input: - * x - pointer to a floating-point value - * - * Output: - * An integer that indicates if the number is NaN. - * - * Description: - * This routine returns an integer that indicates if the number - * passed in is NaN (1) or is finite (0). - * - *****************************************************************/ - -#include "fdlibm.h" -#include "zmath.h" - -#ifndef _DOUBLE_IS_32BITS - -int isnan (double x) -{ - __uint32_t lx, hx; - int exp; - - EXTRACT_WORDS (hx, lx, x); - exp = (hx & 0x7ff00000) >> 20; - - if ((exp == 0x7ff) && (hx & 0xf0000 || lx)) - return (1); - else - return (0); -} - -#endif /* _DOUBLE_IS_32BITS */ |