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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [newlib/] [libm/] [common/] [s_infconst.c] - Blame information for rev 407

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

Line No. Rev Author Line
1 148 jeremybenn
/* Infinity as a constant value.   This is used for HUGE_VAL.
2
 * Added by Cygnus Support.
3
 */
4
 
5
#include <float.h>
6
#include "fdlibm.h"
7
 
8
/* Float version of infinity.  */
9
const union __fmath __infinityf[1] = {{{0x7f800000}}};
10
 
11
/* Double version of infinity.  */
12
#ifndef _DOUBLE_IS_32BITS
13
 #ifdef __IEEE_BIG_ENDIAN
14
  const union __dmath __infinity[1] = {{{0x7ff00000, 0}}};
15
 #else
16
  const union __dmath __infinity[1] = {{{0, 0x7ff00000}}};
17
 #endif
18
#else /* defined (_DOUBLE_IS_32BITS) */
19
 const union __dmath __infinity[1] = {{{0x7f800000, 0}}};
20
#endif /* defined (_DOUBLE_IS_32BITS) */
21
 
22
/* Long double version of infinity.  */
23
#ifdef __IEEE_BIG_ENDIAN
24
 #if LDBL_MANT_DIG == 24
25
  const union __ldmath __infinityld[1] = {{{0x7f800000, 0, 0, 0}}};
26
 #elif LDBL_MANT_DIG == 53
27
  const union __ldmath __infinityld[1] = {{{0x7ff00000, 0, 0, 0}}};
28
 #else
29
  const union __ldmath __infinityld[1] = {{{0x7fff0000, 0, 0, 0}}};
30
 #endif /* LDBL_MANT_DIG size  */
31
#else /* __IEEE_LITTLE_ENDIAN  */
32
 #if LDBL_MANT_DIG == 24
33
  const union __ldmath __infinityld[1] = {{{0x7f800000, 0, 0, 0}}};
34
 #elif LDBL_MANT_DIG == 53
35
  const union __ldmath __infinityld[1] = {{{0, 0x7ff00000, 0, 0}}};
36
 #else
37
  const union __ldmath __infinityld[1] = {{{0, 0x80000000, 0x00007fff, 0}}};
38
 #endif /* LDBL_MANT_DIG size  */
39
#endif /* __IEEE_LITTLE_ENDIAN  */
40
 

powered by: WebSVN 2.1.0

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