PR target/83368
[official-gcc.git] / gcc / testsuite / gfortran.dg / bessel_1.f90
blob728c5ce49caa8d88b702cea787a8fe0982c9c414
1 ! { dg-do run }
3 program test
4 implicit none
6 interface check
7 procedure check_r4
8 procedure check_r8
9 end interface check
11 real(kind=4) :: x4
12 real(kind=8) :: x8
14 x8 = 1.9_8 ; x4 = 1.9_4
15 call check(bessel_j0 (x8), bessel_j0 (1.9_8))
16 call check(bessel_j0 (x4), bessel_j0 (1.9_4))
17 call check(bessel_j1 (x8), bessel_j1 (1.9_8))
18 call check(bessel_j1 (x4), bessel_j1 (1.9_4))
19 call check(bessel_jn (3,x8), bessel_jn (3,1.9_8))
20 call check(bessel_jn (3,x4), bessel_jn (3,1.9_4))
21 call check(bessel_y0 (x8), bessel_y0 (1.9_8))
22 call check(bessel_y0 (x4), bessel_y0 (1.9_4))
23 call check(bessel_y1 (x8), bessel_y1 (1.9_8))
24 call check(bessel_y1 (x4), bessel_y1 (1.9_4))
25 call check(bessel_yn (3,x8), bessel_yn (3,1.9_8))
26 call check(bessel_yn (3,x4), bessel_yn (3,1.9_4))
28 contains
29 subroutine check_r4 (a, b)
30 real(kind=4), intent(in) :: a, b
31 if (abs(a - b) > 1.e-5 * abs(b)) call abort
32 end subroutine
33 subroutine check_r8 (a, b)
34 real(kind=8), intent(in) :: a, b
35 if (abs(a - b) > 1.e-7 * abs(b)) call abort
36 end subroutine
37 end program test