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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [large_real_kind_2.F90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-require-effective-target fortran_large_real }
3
! { dg-xfail-if "" { "*-*-freebsd*" } { "*" }  { "" } }
4
 
5
! Testing library calls on large real kinds (larger than kind=8)
6
  implicit none
7
 
8
  integer,parameter :: k = selected_real_kind (precision (0.0_8) + 1)
9
  real(8),parameter :: eps = 1e-8
10
 
11
  real(kind=k) :: x, x1
12
  real(8) :: y, y1
13
  complex(kind=k) :: z, z1
14
  complex(8) :: w, w1
15
 
16
#define TEST_FUNCTION(func,val) \
17
 x = val ;\
18
 y = x ;\
19
 x = func (x) ;\
20
 y = func (y) ;\
21
 if (abs((y - x) / y) > eps) call abort
22
 
23
#define CTEST_FUNCTION(func,valc) \
24
 z = valc ;\
25
 w = z ;\
26
 z = func (z) ;\
27
 w = func (w) ;\
28
 if (abs((z - w) / w) > eps) call abort
29
 
30
 TEST_FUNCTION(cos,17.456)
31
 TEST_FUNCTION(sin,17.456)
32
 TEST_FUNCTION(tan,1.456)
33
 TEST_FUNCTION(cosh,-2.45)
34
 TEST_FUNCTION(sinh,7.1)
35
 TEST_FUNCTION(tanh,12.7)
36
 TEST_FUNCTION(acos,0.78)
37
 TEST_FUNCTION(asin,-0.24)
38
 TEST_FUNCTION(atan,-17.123)
39
 TEST_FUNCTION(acosh,0.2)
40
 TEST_FUNCTION(asinh,0.3)
41
 TEST_FUNCTION(atanh,0.4)
42
 TEST_FUNCTION(exp,1.74)
43
 TEST_FUNCTION(log,0.00178914)
44
 TEST_FUNCTION(log10,123789.123)
45
 TEST_FUNCTION(sqrt,789.1356)
46
 
47
 CTEST_FUNCTION(cos,(17.456,-1.123))
48
 CTEST_FUNCTION(sin,(17.456,-7.6))
49
 CTEST_FUNCTION(exp,(1.74,-1.01))
50
 CTEST_FUNCTION(log,(0.00178914,-1.207))
51
 CTEST_FUNCTION(sqrt,(789.1356,2.4))
52
 
53
#define TEST_POWER(val1,val2) \
54
 x = val1 ; \
55
 y = x ; \
56
 x1 = val2 ; \
57
 y1 = x1; \
58
 if (abs((x**x1 - y**y1)/(y**y1)) > eps) call abort
59
 
60
#define CTEST_POWER(val1,val2) \
61
 z = val1 ; \
62
 w = z ; \
63
 z1 = val2 ; \
64
 w1 = z1; \
65
 if (abs((z**z1 - w**w1)/(w**w1)) > eps) call abort
66
 
67
 CTEST_POWER (1.0,1.0)
68
 CTEST_POWER (1.0,5.4)
69
 CTEST_POWER (1.0,-5.4)
70
 CTEST_POWER (1.0,0.0)
71
 CTEST_POWER (-1.0,1.0)
72
 CTEST_POWER (-1.0,5.4)
73
 CTEST_POWER (-1.0,-5.4)
74
 CTEST_POWER (-1.0,0.0)
75
 CTEST_POWER (0.0,1.0)
76
 CTEST_POWER (0.0,5.4)
77
 CTEST_POWER (0.0,-5.4)
78
 CTEST_POWER (0.0,0.0)
79
 CTEST_POWER (7.6,1.0)
80
 CTEST_POWER (7.6,5.4)
81
 CTEST_POWER (7.6,-5.4)
82
 CTEST_POWER (7.6,0.0)
83
 CTEST_POWER (-7.6,1.0)
84
 CTEST_POWER (-7.6,5.4)
85
 CTEST_POWER (-7.6,-5.4)
86
 CTEST_POWER (-7.6,0.0)
87
 
88
 CTEST_POWER ((10.78,123.213),(14.123,13279.5))
89
 CTEST_POWER ((-10.78,123.213),(14.123,13279.5))
90
 CTEST_POWER ((10.78,-123.213),(14.123,13279.5))
91
 CTEST_POWER ((10.78,123.213),(-14.123,13279.5))
92
 CTEST_POWER ((10.78,123.213),(14.123,-13279.5))
93
 CTEST_POWER ((-10.78,-123.213),(14.123,13279.5))
94
 CTEST_POWER ((-10.78,123.213),(-14.123,13279.5))
95
 CTEST_POWER ((-10.78,123.213),(14.123,-13279.5))
96
 CTEST_POWER ((10.78,-123.213),(-14.123,13279.5))
97
 CTEST_POWER ((10.78,-123.213),(14.123,-13279.5))
98
 CTEST_POWER ((10.78,123.213),(-14.123,-13279.5))
99
 CTEST_POWER ((-10.78,-123.213),(-14.123,13279.5))
100
 CTEST_POWER ((-10.78,-123.213),(14.123,-13279.5))
101
 CTEST_POWER ((-10.78,123.213),(-14.123,-13279.5))
102
 CTEST_POWER ((10.78,-123.213),(-14.123,-13279.5))
103
 CTEST_POWER ((-10.78,-123.213),(-14.123,-13279.5))
104
 
105
end

powered by: WebSVN 2.1.0

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