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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [dfp/] [decfloat-constants.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-options "-std=gnu99" } */
2
 
3
/* N1150 4: Characteristics of decimal floating types <decfloat.h>.
4
   C99 5.2.4.2.2a[3]: New.
5
 
6
   Verify constants about range of decimal float and three components of
7
   decimal float defined in decfloat.h.  */
8
 
9
/* Make sure we are exporting the right values to decfloat.h. */
10
#include <decfloat.h>
11
 
12
extern void abort (void);
13
 
14
int main ()
15
{
16
  if (DEC32_MANT_DIG != 7) abort();
17
  if (DEC64_MANT_DIG != 16) abort();
18
  if (DEC128_MANT_DIG != 34) abort();
19
 
20
  if (DEC32_MIN_EXP != -95) abort();
21
  if (DEC64_MIN_EXP != -383) abort();
22
  if (DEC128_MIN_EXP != -6143) abort();
23
 
24
  if (DEC32_MAX_EXP != 96) abort();
25
  if (DEC64_MAX_EXP != 384) abort();
26
  if (DEC128_MAX_EXP != 6144) abort();
27
 
28
  if (DEC32_MAX != 9.999999E96DF) abort();
29
  if (DEC64_MAX != 9.999999999999999E384DD) abort();
30
  if (DEC128_MAX != 9.999999999999999999999999999999999E6144DL) abort();
31
 
32
  if (DEC32_EPSILON != 1E-6DF) abort();
33
  if (DEC64_EPSILON != 1E-15DD) abort();
34
  if (DEC128_EPSILON != 1E-33DL) abort();
35
 
36
  if (DEC32_MIN != 1E-95DF) abort();
37
  if (DEC64_MIN != 1E-383DD) abort();
38
  if (DEC128_MIN != 1E-6143DL) abort();
39
 
40
  if (DEC32_DEN != 0.000001E-95DF) abort();
41
  if (DEC64_DEN != 0.000000000000001E-383DD) abort();
42
  if (DEC128_DEN != 0.000000000000000000000000000000001E-6143DL) abort();
43
 
44
  return 0;
45
}

powered by: WebSVN 2.1.0

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