2 ! { dg-options "-Wall -fno-range-check" }
4 ! PR fortran/36158 - Transformational BESSEL_JN/YN
5 ! PR fortran/33197 - F2008 math functions
7 ! This is a dg-do run test as the middle end cannot simplify the
8 ! the scalarization of the elemental function (cf. PR 45305).
10 ! -Wall has been specified to disabled -pedantic, which warns about the
11 ! negative order (GNU extension) to the order of the Bessel functions of
12 ! first and second kind.
19 ! Difference to mpfr_jn <= 1 epsilon
21 if (any (abs (BESSEL_JN(2, 5, 2.457) - [(BESSEL_JN(i
, 2.457), i
= 2, 5)]) &
28 ! Difference to mpfr_yn <= 4 epsilon
30 if (any (abs (BESSEL_YN(2, 5, 2.457) - [(BESSEL_YN(i
, 2.457), i
= 2, 5)]) &
31 > epsilon(0.0)*4)) then
36 ! Difference to mpfr_jn <= 1 epsilon
38 if (any (abs (BESSEL_JN(0, 10, 4.457) &
39 - [ (BESSEL_JN(i
, 4.457), i
= 0, 10) ]) &
45 ! Difference to mpfr_yn <= 192 epsilon
47 if (any (abs (BESSEL_YN(0, 10, 4.457) &
48 - [ (BESSEL_YN(i
, 4.457), i
= 0, 10) ]) &
49 > epsilon(0.0)*192)) then
54 ! Difference to mpfr_jn: None. (Special case: X = 0.0)
56 if (any (BESSEL_JN(0, 10, 0.0) /= [ (BESSEL_JN(i
, 0.0), i
= 0, 10) ])) &
62 ! Difference to mpfr_yn: None. (Special case: X = 0.0)
64 if (any (BESSEL_YN(0, 10, 0.0) /= [ (BESSEL_YN(i
, 0.0), i
= 0, 10) ])) &
70 ! Difference to mpfr_jn <= 1 epsilon
72 if (any (abs (BESSEL_JN(0, 10, 1.0) &
73 - [ (BESSEL_JN(i
, 1.0), i
= 0, 10) ]) &
74 > epsilon(0.0)*1)) then
78 ! Difference to mpfr_yn <= 32 epsilon
80 if (any (abs (BESSEL_YN(0, 10, 1.0) &
81 - [ (BESSEL_YN(i
, 1.0), i
= 0, 10) ]) &
82 > epsilon(0.0)*32)) then