1! { dg-do run } 2! PR fortran/24518 3! MOD/MODULO of large arguments. 4! The naive algorithm goes pear-shaped for large arguments, instead 5! use fmod. 6! Here we test only with constant arguments (evaluated with 7! mpfr_fmod), as we don't want to cause failures on targets with a 8! crappy libm. 9program mod_large_1 10 implicit none 11 real :: r1 12 r1 = mod (1e22, 1.7) 13 if (abs(r1 - 0.995928764) > 1e-5) call abort 14 r1 = modulo (1e22, -1.7) 15 if (abs(r1 + 0.704071283) > 1e-5) call abort 16end program mod_large_1 17