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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [large_real_kind_2.F90] - Blame information for rev 841

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

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

powered by: WebSVN 2.1.0

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