source: trunk/libs/newlib/src/newlib/libm/common/s_infinity.c @ 567

Last change on this file since 567 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 925 bytes
Line 
1/*
2 * infinity () returns the representation of infinity.
3 * Added by Cygnus Support.
4 */
5
6/*
7FUNCTION
8        <<infinity>>, <<infinityf>>---representation of infinity
9
10INDEX
11        infinity
12INDEX
13        infinityf
14
15SYNOPSIS
16        #include <math.h>
17        double infinity(void);
18        float infinityf(void);
19
20DESCRIPTION
21        <<infinity>> and <<infinityf>> return the special number IEEE
22        infinity in double- and single-precision arithmetic
23        respectively.
24
25PORTABILITY
26<<infinity>> and <<infinityf>> are neither standard C nor POSIX.  C and
27POSIX require macros HUGE_VAL and HUGE_VALF to be defined in math.h, which
28Newlib defines to be infinities corresponding to these archaic infinity()
29and infinityf() functions in floating-point implementations which do have
30infinities.
31
32QUICKREF
33        infinity - pure
34
35*/
36
37#include "fdlibm.h"
38
39#ifndef _DOUBLE_IS_32BITS
40
41        double infinity()
42{
43        double x;
44
45        INSERT_WORDS(x,0x7ff00000,0);
46        return x;
47}
48
49#endif /* _DOUBLE_IS_32BITS */
Note: See TracBrowser for help on using the repository browser.