1 /*
2 Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
3
4 Developed at SunPro, a Sun Microsystems, Inc. business.
5 Permission to use, copy, modify, and distribute this
6 software is freely granted, provided that this notice
7 is preserved.
8 */
9 /*
10 * infinity () returns the representation of infinity.
11 * Added by Cygnus Support.
12 */
13
14 /*
15 FUNCTION
16 <<infinity>>, <<infinityf>>---representation of infinity
17
18 INDEX
19 infinity
20 INDEX
21 infinityf
22
23 SYNOPSIS
24 #include <math.h>
25 double infinity(void);
26 float infinityf(void);
27
28 DESCRIPTION
29 <<infinity>> and <<infinityf>> return the special number IEEE
30 infinity in double- and single-precision arithmetic
31 respectively.
32
33 PORTABILITY
34 <<infinity>> and <<infinityf>> are neither standard C nor POSIX. C and
35 POSIX require macros HUGE_VAL and HUGE_VALF to be defined in math.h, which
36 Newlib defines to be infinities corresponding to these archaic infinity()
37 and infinityf() functions in floating-point implementations which do have
38 infinities.
39
40 QUICKREF
41 infinity - pure
42
43 */
44
45 #include "fdlibm.h"
46
47 #ifdef _NEED_FLOAT64
48
49 __float64
infinity64(void)50 infinity64(void)
51 {
52 __float64 x;
53
54 INSERT_WORDS(x,0x7ff00000,0);
55 return x;
56 }
57
58 _MATH_ALIAS_d(infinity)
59
60 #endif /* _NEED_FLOAT64 */
61