From a6a6f9feceadef016ed84d6f23b81733b47985f0 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 1 Nov 2001 19:47:32 +0000 Subject: 2001-11-01 Arati Dikey * libm/mathfp/sf_isinf.c (isinff): Change to use _DEFUN macro. [_DOUBLE_IS_32BITS](isinf): New function that calls isinff. * libm/mathfp/sf_isnan.c (isnanf): Change to use _DEFUN macro. [_DOUBLE_IS_32BITS](isnan): New function that calls isnanf. --- newlib/ChangeLog | 7 +++++++ newlib/libm/mathfp/sf_isinf.c | 17 ++++++++++++++++- newlib/libm/mathfp/sf_isnan.c | 17 ++++++++++++++++- 3 files changed, 39 insertions(+), 2 deletions(-) (limited to 'newlib') diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 4ecd47a45..4cb8a1995 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,10 @@ +2001-11-01 Arati Dikey + + * libm/mathfp/sf_isinf.c (isinff): Change to use _DEFUN macro. + [_DOUBLE_IS_32BITS](isinf): New function that calls isinff. + * libm/mathfp/sf_isnan.c (isnanf): Change to use _DEFUN macro. + [_DOUBLE_IS_32BITS](isnan): New function that calls isnanf. + 2001-10-24 Christopher Faylor * libc/stdio/fseek.c: Reset pointer to buffer base 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) */ + -- cgit v1.2.3