2 ! { dg-require-effective-target fortran_large_real }
3 ! { dg-xfail-if "" { "*-*-freebsd*" } { "*" } { "" } }
5 ! Testing library calls on large real kinds (larger than kind=8)
8 integer,parameter :: k = selected_real_kind (precision (0.0_8) + 1)
9 real(8),parameter :: eps = 1e-8
13 complex(kind=k) :: z, z1
16 #define TEST_FUNCTION(func,val) \
21 if (abs((y - x) / y) > eps) call abort
23 #define CTEST_FUNCTION(func,valc) \
28 if (abs((z - w) / w) > eps) call abort
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)
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))
53 #define TEST_POWER(val1,val2) \
58 if (abs((x**x1 - y**y1)/(y**y1)) > eps) call abort
60 #define CTEST_POWER(val1,val2) \
65 if (abs((z**z1 - w**w1)/(w**w1)) > eps) call abort
69 CTEST_POWER (1.0,-5.4)
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)
77 CTEST_POWER (0.0,-5.4)
81 CTEST_POWER (7.6,-5.4)
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)
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))