diff options
Diffstat (limited to 'newlib/libm')
-rw-r--r-- | newlib/libm/mathfp/sf_isinf.c | 17 | ||||
-rw-r--r-- | newlib/libm/mathfp/sf_isnan.c | 17 |
2 files changed, 32 insertions, 2 deletions
diff --git a/newlib/libm/mathfp/sf_isinf.c b/newlib/libm/mathfp/sf_isinf.c index 5d537607a..84ab3f71c 100644 --- a/newlib/libm/mathfp/sf_isinf.c +++ b/newlib/libm/mathfp/sf_isinf.c @@ -18,7 +18,9 @@ #include "fdlibm.h" #include "zmath.h" -int isinff (float x) +int +_DEFUN (isinff, (float), + float x) { __uint32_t wx; int exp; @@ -31,3 +33,16 @@ int isinff (float x) else return (0); } + +#ifdef _DOUBLE_IS_32BITS + +int +_DEFUN (isinf, (double), + double x) +{ + return isinff ((float) x); +} + +#endif /* defined(_DOUBLE_IS_32BITS) */ + + diff --git a/newlib/libm/mathfp/sf_isnan.c b/newlib/libm/mathfp/sf_isnan.c index 3dcdbf452..ac557a6b8 100644 --- a/newlib/libm/mathfp/sf_isnan.c +++ b/newlib/libm/mathfp/sf_isnan.c @@ -18,7 +18,9 @@ #include "fdlibm.h" #include "zmath.h" -int isnanf (float x) +int +_DEFUN (isnanf, (float), + float x) { __int32_t wx; int exp; @@ -31,3 +33,16 @@ int isnanf (float x) else return (0); } + + +#ifdef _DOUBLE_IS_32BITS + +int +_DEFUN (isnan, (double), + double x) +{ + return isnanf((float) x); +} + +#endif /* defined(_DOUBLE_IS_32BITS) */ + |