OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [newlib/] [libm/] [common/] [s_infinity.c] - Blame information for rev 471

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
/*
2
 * infinity () returns the representation of infinity.
3
 * Added by Cygnus Support.
4
 */
5
 
6
/*
7
FUNCTION
8
        <<infinity>>, <<infinityf>>--representation of infinity
9
 
10
INDEX
11
        infinity
12
INDEX
13
        infinityf
14
 
15
ANSI_SYNOPSIS
16
        #include <math.h>
17
        double infinity(void);
18
        float infinityf(void);
19
 
20
DESCRIPTION
21
        <<infinity>> and <<infinityf>> return the special number IEEE
22
        infinity in double- and single-precision arithmetic
23
        respectively.
24
 
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.
31
 
32
QUICKREF
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 */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.