From 8a0efa53e44919bcf5ccb1d3353618a82afdf8bc Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 17 Feb 2000 19:39:52 +0000 Subject: import newlib-2000-02-17 snapshot --- newlib/libm/common/s_infinity.c | 48 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 newlib/libm/common/s_infinity.c (limited to 'newlib/libm/common/s_infinity.c') diff --git a/newlib/libm/common/s_infinity.c b/newlib/libm/common/s_infinity.c new file mode 100644 index 000000000..6508216bd --- /dev/null +++ b/newlib/libm/common/s_infinity.c @@ -0,0 +1,48 @@ +/* + * infinity () returns the representation of infinity. + * Added by Cygnus Support. + */ + +/* +FUNCTION + <>, <>---representation of infinity + +INDEX + infinity +INDEX + infinityf + +ANSI_SYNOPSIS + #include + double infinity(void); + float infinityf(void); + +TRAD_SYNOPSIS + #include + double infinity(); + float infinityf(); + + +DESCRIPTION + <> and <> return the special number IEEE + infinity in double and single precision arithmetic + respectivly. + +QUICKREF + infinity - pure + +*/ + +#include "fdlibm.h" + +#ifndef _DOUBLE_IS_32BITS + + double infinity() +{ + double x; + + INSERT_WORDS(x,0x7ff00000,0); + return x; +} + +#endif /* _DOUBLE_IS_32BITS */ -- cgit v1.2.3