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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [dfp/] [decfloat-constants.c] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* N1150 4: Characteristics of decimal floating types <float.h>.
2
   C99 5.2.4.2.2a[3]: New.
3
 
4
   Verify constants about range of decimal float and three components of
5
   decimal float defined in float.h.  */
6
 
7
/* Make sure we are exporting the right values to float.h. */
8
#ifndef __STDC_WANT_DEC_FP__
9
#define __STDC_WANT_DEC_FP__ 1
10
#endif
11
 
12
#include "dfp-dbg.h"
13
#include <float.h>
14
 
15
int main ()
16
{
17
  if (DEC32_MANT_DIG != 7) FAILURE
18
  if (DEC64_MANT_DIG != 16) FAILURE
19
  if (DEC128_MANT_DIG != 34) FAILURE
20
 
21
  if (DEC32_MIN_EXP != -94) FAILURE
22
  if (DEC64_MIN_EXP != -382) FAILURE
23
  if (DEC128_MIN_EXP != -6142) FAILURE
24
 
25
  if (DEC32_MAX_EXP != 97) FAILURE
26
  if (DEC64_MAX_EXP != 385) FAILURE
27
  if (DEC128_MAX_EXP != 6145) FAILURE
28
 
29
  if (DEC32_MAX != 9.999999E96DF) FAILURE
30
  if (DEC64_MAX != 9.999999999999999E384DD) FAILURE
31
  if (DEC128_MAX != 9.999999999999999999999999999999999E6144DL) FAILURE
32
 
33
  if (DEC32_EPSILON != 1E-6DF) FAILURE
34
  if (DEC64_EPSILON != 1E-15DD) FAILURE
35
  if (DEC128_EPSILON != 1E-33DL) FAILURE
36
 
37
  if (DEC32_MIN != 1E-95DF) FAILURE
38
  if (DEC64_MIN != 1E-383DD) FAILURE
39
  if (DEC128_MIN != 1E-6143DL) FAILURE
40
 
41
  if (DEC32_SUBNORMAL_MIN != 0.000001E-95DF) FAILURE
42
  if (DEC64_SUBNORMAL_MIN != 0.000000000000001E-383DD) FAILURE
43
  if (DEC128_SUBNORMAL_MIN != 0.000000000000000000000000000000001E-6143DL)
44
    FAILURE
45
 
46
  FINISH
47
}

powered by: WebSVN 2.1.0

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