diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2006-02-28 02:51:28 +0300 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2006-02-28 02:51:28 +0300 |
commit | e48682cff514c0480aff58a3e752edf7eb9ff228 (patch) | |
tree | 0e9c096a2b54e60d287d32cec39017b36714871c /newlib/libm/math | |
parent | 47a5b664e5095434abe0630008fce5dc9f323130 (diff) |
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/math')
-rw-r--r-- | newlib/libm/math/Makefile.am | 12 | ||||
-rw-r--r-- | newlib/libm/math/Makefile.in | 61 | ||||
-rw-r--r-- | newlib/libm/math/s_isinf.c | 26 | ||||
-rw-r--r-- | newlib/libm/math/s_isnan.c | 122 | ||||
-rw-r--r-- | newlib/libm/math/sf_isinf.c | 33 | ||||
-rw-r--r-- | newlib/libm/math/sf_isnan.c | 47 |
6 files changed, 30 insertions, 271 deletions
diff --git a/newlib/libm/math/Makefile.am b/newlib/libm/math/Makefile.am index 4b4db93d8..f5971fac9 100644 --- a/newlib/libm/math/Makefile.am +++ b/newlib/libm/math/Makefile.am @@ -22,10 +22,9 @@ src = k_standard.c k_rem_pio2.c \ w_cabs.c w_drem.c \ s_asinh.c s_atan.c s_ceil.c \ s_cos.c s_erf.c s_fabs.c s_floor.c \ - s_frexp.c s_isnan.c s_ldexp.c \ + s_frexp.c s_ldexp.c \ s_signif.c s_sin.c \ s_tan.c s_tanh.c \ - s_isinf.c \ w_exp2.c w_tgamma.c fsrc = kf_rem_pio2.c \ @@ -46,10 +45,9 @@ fsrc = kf_rem_pio2.c \ wf_cabs.c wf_drem.c \ sf_asinh.c sf_atan.c sf_ceil.c \ sf_cos.c sf_erf.c sf_fabs.c sf_floor.c \ - sf_frexp.c sf_isnan.c sf_ldexp.c \ + sf_frexp.c sf_ldexp.c \ sf_signif.c sf_sin.c \ sf_tan.c sf_tanh.c \ - sf_isinf.c \ wf_exp2.c wf_tgamma.c libmath_la_LDFLAGS = -Xcompiler -nostdlib @@ -73,8 +71,7 @@ chobj = wacos.def wacosh.def wasin.def sasinh.def \ wgamma.def whypot.def sldexp.def wlog.def \ wlog10.def \ wpow.def wremainder.def ssin.def wsinh.def \ - wsqrt.def stan.def stanh.def \ - sisnan.def + wsqrt.def stan.def stanh.def SUFFIXES = .def @@ -178,9 +175,6 @@ stan.def: s_tan.c stanh.def: s_tanh.c $(CHEW) < $(srcdir)/s_tanh.c >$@ 2>/dev/null touch stmp-def -sisnan.def: s_isnan.c - $(CHEW) < $(srcdir)/s_isnan.c >$@ 2>/dev/null - touch stmp-def # A partial dependency list. diff --git a/newlib/libm/math/Makefile.in b/newlib/libm/math/Makefile.in index 1de8a5398..f00e189c7 100644 --- a/newlib/libm/math/Makefile.in +++ b/newlib/libm/math/Makefile.in @@ -98,10 +98,10 @@ AUTOMAKE_OPTIONS = cygnus INCLUDES = -I$(srcdir)/../common $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) -src = k_standard.c k_rem_pio2.c k_cos.c k_sin.c k_tan.c e_acos.c e_acosh.c e_asin.c e_atan2.c e_atanh.c e_cosh.c e_exp.c e_fmod.c er_gamma.c e_hypot.c e_j0.c e_j1.c e_jn.c er_lgamma.c e_log.c e_log10.c e_pow.c e_rem_pio2.c e_remainder.c e_scalb.c e_sinh.c e_sqrt.c w_acos.c w_acosh.c w_asin.c w_atan2.c w_atanh.c w_cosh.c w_exp.c w_fmod.c w_gamma.c wr_gamma.c w_hypot.c w_j0.c w_j1.c w_jn.c w_lgamma.c wr_lgamma.c w_log.c w_log10.c w_pow.c w_remainder.c w_scalb.c w_sinh.c w_sqrt.c w_sincos.c w_cabs.c w_drem.c s_asinh.c s_atan.c s_ceil.c s_cos.c s_erf.c s_fabs.c s_floor.c s_frexp.c s_isnan.c s_ldexp.c s_signif.c s_sin.c s_tan.c s_tanh.c s_isinf.c w_exp2.c w_tgamma.c +src = k_standard.c k_rem_pio2.c k_cos.c k_sin.c k_tan.c e_acos.c e_acosh.c e_asin.c e_atan2.c e_atanh.c e_cosh.c e_exp.c e_fmod.c er_gamma.c e_hypot.c e_j0.c e_j1.c e_jn.c er_lgamma.c e_log.c e_log10.c e_pow.c e_rem_pio2.c e_remainder.c e_scalb.c e_sinh.c e_sqrt.c w_acos.c w_acosh.c w_asin.c w_atan2.c w_atanh.c w_cosh.c w_exp.c w_fmod.c w_gamma.c wr_gamma.c w_hypot.c w_j0.c w_j1.c w_jn.c w_lgamma.c wr_lgamma.c w_log.c w_log10.c w_pow.c w_remainder.c w_scalb.c w_sinh.c w_sqrt.c w_sincos.c w_cabs.c w_drem.c s_asinh.c s_atan.c s_ceil.c s_cos.c s_erf.c s_fabs.c s_floor.c s_frexp.c s_ldexp.c s_signif.c s_sin.c s_tan.c s_tanh.c w_exp2.c w_tgamma.c -fsrc = kf_rem_pio2.c kf_cos.c kf_sin.c kf_tan.c ef_acos.c ef_acosh.c ef_asin.c ef_atan2.c ef_atanh.c ef_cosh.c ef_exp.c ef_fmod.c erf_gamma.c ef_hypot.c ef_j0.c ef_j1.c ef_jn.c erf_lgamma.c ef_log.c ef_log10.c ef_pow.c ef_rem_pio2.c ef_remainder.c ef_scalb.c ef_sinh.c ef_sqrt.c wf_acos.c wf_acosh.c wf_asin.c wf_atan2.c wf_atanh.c wf_cosh.c wf_exp.c wf_fmod.c wf_gamma.c wrf_gamma.c wf_hypot.c wf_j0.c wf_j1.c wf_jn.c wf_lgamma.c wrf_lgamma.c wf_log.c wf_log10.c wf_pow.c wf_remainder.c wf_scalb.c wf_sinh.c wf_sqrt.c wf_sincos.c wf_cabs.c wf_drem.c sf_asinh.c sf_atan.c sf_ceil.c sf_cos.c sf_erf.c sf_fabs.c sf_floor.c sf_frexp.c sf_isnan.c sf_ldexp.c sf_signif.c sf_sin.c sf_tan.c sf_tanh.c sf_isinf.c wf_exp2.c wf_tgamma.c +fsrc = kf_rem_pio2.c kf_cos.c kf_sin.c kf_tan.c ef_acos.c ef_acosh.c ef_asin.c ef_atan2.c ef_atanh.c ef_cosh.c ef_exp.c ef_fmod.c erf_gamma.c ef_hypot.c ef_j0.c ef_j1.c ef_jn.c erf_lgamma.c ef_log.c ef_log10.c ef_pow.c ef_rem_pio2.c ef_remainder.c ef_scalb.c ef_sinh.c ef_sqrt.c wf_acos.c wf_acosh.c wf_asin.c wf_atan2.c wf_atanh.c wf_cosh.c wf_exp.c wf_fmod.c wf_gamma.c wrf_gamma.c wf_hypot.c wf_j0.c wf_j1.c wf_jn.c wf_lgamma.c wrf_lgamma.c wf_log.c wf_log10.c wf_pow.c wf_remainder.c wf_scalb.c wf_sinh.c wf_sqrt.c wf_sincos.c wf_cabs.c wf_drem.c sf_asinh.c sf_atan.c sf_ceil.c sf_cos.c sf_erf.c sf_fabs.c sf_floor.c sf_frexp.c sf_ldexp.c sf_signif.c sf_sin.c sf_tan.c sf_tanh.c wf_exp2.c wf_tgamma.c libmath_la_LDFLAGS = -Xcompiler -nostdlib @@ -113,7 +113,7 @@ libmath_la_LDFLAGS = -Xcompiler -nostdlib @USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a @USE_LIBTOOL_FALSE@lib_a_SOURCES = $(src) $(fsrc) -chobj = wacos.def wacosh.def wasin.def sasinh.def satan.def watan2.def watanh.def wj0.def wcosh.def serf.def wexp.def sfabs.def sfloor.def wfmod.def sfrexp.def wgamma.def whypot.def sldexp.def wlog.def wlog10.def wpow.def wremainder.def ssin.def wsinh.def wsqrt.def stan.def stanh.def sisnan.def +chobj = wacos.def wacosh.def wasin.def sasinh.def satan.def watan2.def watanh.def wj0.def wcosh.def serf.def wexp.def sfabs.def sfloor.def wfmod.def sfrexp.def wgamma.def whypot.def sldexp.def wlog.def wlog10.def wpow.def wremainder.def ssin.def wsinh.def wsqrt.def stan.def stanh.def SUFFIXES = .def @@ -154,10 +154,9 @@ lib_a_LIBADD = @USE_LIBTOOL_FALSE@w_cabs.$(OBJEXT) w_drem.$(OBJEXT) s_asinh.$(OBJEXT) \ @USE_LIBTOOL_FALSE@s_atan.$(OBJEXT) s_ceil.$(OBJEXT) s_cos.$(OBJEXT) \ @USE_LIBTOOL_FALSE@s_erf.$(OBJEXT) s_fabs.$(OBJEXT) s_floor.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_frexp.$(OBJEXT) s_isnan.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_ldexp.$(OBJEXT) s_signif.$(OBJEXT) s_sin.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_tan.$(OBJEXT) s_tanh.$(OBJEXT) s_isinf.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@w_exp2.$(OBJEXT) w_tgamma.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@s_frexp.$(OBJEXT) s_ldexp.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@s_signif.$(OBJEXT) s_sin.$(OBJEXT) s_tan.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@s_tanh.$(OBJEXT) w_exp2.$(OBJEXT) w_tgamma.$(OBJEXT) \ @USE_LIBTOOL_FALSE@kf_rem_pio2.$(OBJEXT) kf_cos.$(OBJEXT) \ @USE_LIBTOOL_FALSE@kf_sin.$(OBJEXT) kf_tan.$(OBJEXT) ef_acos.$(OBJEXT) \ @USE_LIBTOOL_FALSE@ef_acosh.$(OBJEXT) ef_asin.$(OBJEXT) \ @@ -185,11 +184,9 @@ lib_a_LIBADD = @USE_LIBTOOL_FALSE@sf_atan.$(OBJEXT) sf_ceil.$(OBJEXT) sf_cos.$(OBJEXT) \ @USE_LIBTOOL_FALSE@sf_erf.$(OBJEXT) sf_fabs.$(OBJEXT) \ @USE_LIBTOOL_FALSE@sf_floor.$(OBJEXT) sf_frexp.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_isnan.$(OBJEXT) sf_ldexp.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_signif.$(OBJEXT) sf_sin.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_tan.$(OBJEXT) sf_tanh.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_isinf.$(OBJEXT) wf_exp2.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@wf_tgamma.$(OBJEXT) +@USE_LIBTOOL_FALSE@sf_ldexp.$(OBJEXT) sf_signif.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_sin.$(OBJEXT) sf_tan.$(OBJEXT) sf_tanh.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@wf_exp2.$(OBJEXT) wf_tgamma.$(OBJEXT) LTLIBRARIES = $(noinst_LTLIBRARIES) libmath_la_LIBADD = @@ -206,25 +203,24 @@ libmath_la_LIBADD = @USE_LIBTOOL_TRUE@w_remainder.lo w_scalb.lo w_sinh.lo w_sqrt.lo \ @USE_LIBTOOL_TRUE@w_sincos.lo w_cabs.lo w_drem.lo s_asinh.lo s_atan.lo \ @USE_LIBTOOL_TRUE@s_ceil.lo s_cos.lo s_erf.lo s_fabs.lo s_floor.lo \ -@USE_LIBTOOL_TRUE@s_frexp.lo s_isnan.lo s_ldexp.lo s_signif.lo s_sin.lo \ -@USE_LIBTOOL_TRUE@s_tan.lo s_tanh.lo s_isinf.lo w_exp2.lo w_tgamma.lo \ -@USE_LIBTOOL_TRUE@kf_rem_pio2.lo kf_cos.lo kf_sin.lo kf_tan.lo \ -@USE_LIBTOOL_TRUE@ef_acos.lo ef_acosh.lo ef_asin.lo ef_atan2.lo \ -@USE_LIBTOOL_TRUE@ef_atanh.lo ef_cosh.lo ef_exp.lo ef_fmod.lo \ -@USE_LIBTOOL_TRUE@erf_gamma.lo ef_hypot.lo ef_j0.lo ef_j1.lo ef_jn.lo \ -@USE_LIBTOOL_TRUE@erf_lgamma.lo ef_log.lo ef_log10.lo ef_pow.lo \ -@USE_LIBTOOL_TRUE@ef_rem_pio2.lo ef_remainder.lo ef_scalb.lo ef_sinh.lo \ -@USE_LIBTOOL_TRUE@ef_sqrt.lo wf_acos.lo wf_acosh.lo wf_asin.lo \ -@USE_LIBTOOL_TRUE@wf_atan2.lo wf_atanh.lo wf_cosh.lo wf_exp.lo \ -@USE_LIBTOOL_TRUE@wf_fmod.lo wf_gamma.lo wrf_gamma.lo wf_hypot.lo \ -@USE_LIBTOOL_TRUE@wf_j0.lo wf_j1.lo wf_jn.lo wf_lgamma.lo wrf_lgamma.lo \ -@USE_LIBTOOL_TRUE@wf_log.lo wf_log10.lo wf_pow.lo wf_remainder.lo \ -@USE_LIBTOOL_TRUE@wf_scalb.lo wf_sinh.lo wf_sqrt.lo wf_sincos.lo \ -@USE_LIBTOOL_TRUE@wf_cabs.lo wf_drem.lo sf_asinh.lo sf_atan.lo \ -@USE_LIBTOOL_TRUE@sf_ceil.lo sf_cos.lo sf_erf.lo sf_fabs.lo sf_floor.lo \ -@USE_LIBTOOL_TRUE@sf_frexp.lo sf_isnan.lo sf_ldexp.lo sf_signif.lo \ -@USE_LIBTOOL_TRUE@sf_sin.lo sf_tan.lo sf_tanh.lo sf_isinf.lo wf_exp2.lo \ -@USE_LIBTOOL_TRUE@wf_tgamma.lo +@USE_LIBTOOL_TRUE@s_frexp.lo s_ldexp.lo s_signif.lo s_sin.lo s_tan.lo \ +@USE_LIBTOOL_TRUE@s_tanh.lo w_exp2.lo w_tgamma.lo kf_rem_pio2.lo \ +@USE_LIBTOOL_TRUE@kf_cos.lo kf_sin.lo kf_tan.lo ef_acos.lo ef_acosh.lo \ +@USE_LIBTOOL_TRUE@ef_asin.lo ef_atan2.lo ef_atanh.lo ef_cosh.lo \ +@USE_LIBTOOL_TRUE@ef_exp.lo ef_fmod.lo erf_gamma.lo ef_hypot.lo \ +@USE_LIBTOOL_TRUE@ef_j0.lo ef_j1.lo ef_jn.lo erf_lgamma.lo ef_log.lo \ +@USE_LIBTOOL_TRUE@ef_log10.lo ef_pow.lo ef_rem_pio2.lo ef_remainder.lo \ +@USE_LIBTOOL_TRUE@ef_scalb.lo ef_sinh.lo ef_sqrt.lo wf_acos.lo \ +@USE_LIBTOOL_TRUE@wf_acosh.lo wf_asin.lo wf_atan2.lo wf_atanh.lo \ +@USE_LIBTOOL_TRUE@wf_cosh.lo wf_exp.lo wf_fmod.lo wf_gamma.lo \ +@USE_LIBTOOL_TRUE@wrf_gamma.lo wf_hypot.lo wf_j0.lo wf_j1.lo wf_jn.lo \ +@USE_LIBTOOL_TRUE@wf_lgamma.lo wrf_lgamma.lo wf_log.lo wf_log10.lo \ +@USE_LIBTOOL_TRUE@wf_pow.lo wf_remainder.lo wf_scalb.lo wf_sinh.lo \ +@USE_LIBTOOL_TRUE@wf_sqrt.lo wf_sincos.lo wf_cabs.lo wf_drem.lo \ +@USE_LIBTOOL_TRUE@sf_asinh.lo sf_atan.lo sf_ceil.lo sf_cos.lo sf_erf.lo \ +@USE_LIBTOOL_TRUE@sf_fabs.lo sf_floor.lo sf_frexp.lo sf_ldexp.lo \ +@USE_LIBTOOL_TRUE@sf_signif.lo sf_sin.lo sf_tan.lo sf_tanh.lo \ +@USE_LIBTOOL_TRUE@wf_exp2.lo wf_tgamma.lo CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -550,9 +546,6 @@ stan.def: s_tan.c stanh.def: s_tanh.c $(CHEW) < $(srcdir)/s_tanh.c >$@ 2>/dev/null touch stmp-def -sisnan.def: s_isnan.c - $(CHEW) < $(srcdir)/s_isnan.c >$@ 2>/dev/null - touch stmp-def # A partial dependency list. diff --git a/newlib/libm/math/s_isinf.c b/newlib/libm/math/s_isinf.c deleted file mode 100644 index 87f099566..000000000 --- a/newlib/libm/math/s_isinf.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * isinf(x) returns 1 if x is infinity, else 0; - * no branching! - * Added by Cygnus Support. - */ - -#include "fdlibm.h" - -#ifndef _DOUBLE_IS_32BITS - -#ifdef __STDC__ - int isinf(double x) -#else - int isinf(x) - double x; -#endif -{ - __int32_t hx,lx; - EXTRACT_WORDS(hx,lx,x); - hx &= 0x7fffffff; - hx |= (__uint32_t)(lx|(-lx))>>31; - hx = 0x7ff00000 - hx; - return 1 - (int)((__uint32_t)(hx|(-hx))>>31); -} - -#endif /* _DOUBLE_IS_32BITS */ diff --git a/newlib/libm/math/s_isnan.c b/newlib/libm/math/s_isnan.c deleted file mode 100644 index 596bd2d2a..000000000 --- a/newlib/libm/math/s_isnan.c +++ /dev/null @@ -1,122 +0,0 @@ - -/* @(#)s_isnan.c 5.1 93/09/24 */ -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -/* -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(x) returns 1 is x is nan, else 0; - * no branching! - */ - -#include "fdlibm.h" - -#ifndef _DOUBLE_IS_32BITS - -#ifdef __STDC__ - int isnan(double x) -#else - int isnan(x) - double x; -#endif -{ - __int32_t hx,lx; - EXTRACT_WORDS(hx,lx,x); - hx &= 0x7fffffff; - hx |= (__uint32_t)(lx|(-lx))>>31; - hx = 0x7ff00000 - hx; - return (int)(((__uint32_t)(hx))>>31); -} - -#endif /* _DOUBLE_IS_32BITS */ diff --git a/newlib/libm/math/sf_isinf.c b/newlib/libm/math/sf_isinf.c deleted file mode 100644 index 43a8abdf2..000000000 --- a/newlib/libm/math/sf_isinf.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * isinff(x) returns 1 if x is +-infinity, else 0; - * Added by Cygnus Support. - */ - -#include "fdlibm.h" - -#ifdef __STDC__ - int isinff(float x) -#else - int isinff(x) - float x; -#endif -{ - __int32_t ix; - GET_FLOAT_WORD(ix,x); - ix &= 0x7fffffff; - return FLT_UWORD_IS_INFINITE(ix); -} - -#ifdef _DOUBLE_IS_32BITS - -#ifdef __STDC__ - int isinf(double x) -#else - int isinf(x) - double x; -#endif -{ - return isinff((float) x); -} - -#endif /* defined(_DOUBLE_IS_32BITS) */ diff --git a/newlib/libm/math/sf_isnan.c b/newlib/libm/math/sf_isnan.c deleted file mode 100644 index 0b4be3e9c..000000000 --- a/newlib/libm/math/sf_isnan.c +++ /dev/null @@ -1,47 +0,0 @@ -/* sf_isnan.c -- float version of s_isnan.c. - * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. - */ - -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -/* - * isnanf(x) returns 1 is x is nan, else 0; - */ - -#include "fdlibm.h" - -#ifdef __STDC__ - int isnanf(float x) -#else - int isnanf(x) - float x; -#endif -{ - __int32_t ix; - GET_FLOAT_WORD(ix,x); - ix &= 0x7fffffff; - return FLT_UWORD_IS_NAN(ix); -} - -#ifdef _DOUBLE_IS_32BITS - -#ifdef __STDC__ - int isnan(double x) -#else - int isnan(x) - double x; -#endif -{ - return isnanf((float) x); -} - -#endif /* defined(_DOUBLE_IS_32BITS) */ |