Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libm / common / s_infinity.c
blob990777d2cb64b3baebd50fb7ee4e6acf24b5f8de
1 /*
2 * infinity () returns the representation of infinity.
3 * Added by Cygnus Support.
4 */
6 /*
7 FUNCTION
8 <<infinity>>, <<infinityf>>---representation of infinity
10 INDEX
11 infinity
12 INDEX
13 infinityf
15 SYNOPSIS
16 #include <math.h>
17 double infinity(void);
18 float infinityf(void);
20 DESCRIPTION
21 <<infinity>> and <<infinityf>> return the special number IEEE
22 infinity in double- and single-precision arithmetic
23 respectively.
25 PORTABILITY
26 <<infinity>> and <<infinityf>> are neither standard C nor POSIX. C and
27 POSIX require macros HUGE_VAL and HUGE_VALF to be defined in math.h, which
28 Newlib defines to be infinities corresponding to these archaic infinity()
29 and infinityf() functions in floating-point implementations which do have
30 infinities.
32 QUICKREF
33 infinity - pure
37 #include "fdlibm.h"
39 #ifndef _DOUBLE_IS_32BITS
41 double infinity()
43 double x;
45 INSERT_WORDS(x,0x7ff00000,0);
46 return x;
49 #endif /* _DOUBLE_IS_32BITS */