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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [c-c++-common/] [dfp/] [convert-bfp-2.c] - Blame information for rev 705

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

Line No. Rev Author Line
1 686 jeremybenn
/* This test assumes IEEE float and double.  It also tests long double
2
   but makes no assumption about its size or range of values.  */
3
 
4
#include "convert.h"
5
 
6
volatile _Decimal32 sd;
7
volatile _Decimal64 dd;
8
volatile _Decimal128 td;
9
volatile float sf;
10
volatile double df;
11
volatile long double tf;   /* might actually be df or xf, doesn't matter */
12
 
13
CONVERT_VALID_ALL (t1, 0.0, 0.)
14
CONVERT_VALID_ALL (t2, 1.0, 0.)
15
CONVERT_VALID_ALL (t3, -11.5, 0.)
16
CONVERT_VALID_ALL (t4, 7.0, 0.1e-14)
17
CONVERT_VALID_ALL (t5, -7.0, 0.1e-14)
18
CONVERT_VALID_ALL (t6, 999999., 0.)
19
CONVERT_VALID_ALL (t7, -999999., 0.)
20
 
21
int
22
main ()
23
{
24
  CALL_VALID_ALL (t1)
25
  CALL_VALID_ALL (t2)
26
  CALL_VALID_ALL (t3)
27
  CALL_VALID_ALL (t4)
28
  CALL_VALID_ALL (t5)
29
  CALL_VALID_ALL (t6)
30
  CALL_VALID_ALL (t7)
31
 
32
  FINISH
33
}

powered by: WebSVN 2.1.0

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