9 integer,
parameter :: rk = selected_real_kind(15)
10 complex(kind=rk) :: x, y
11 complex(kind=rk) :: a(5), b(5)
17 call test% assert_equal((1234, -1234), (1234, -1234))
19 call test% assert_close((1._rk, 0._rk), (1._rk, 0._rk))
21 call test% assert_close(cmplx(1., epsilon(0.)), (1., 0.))
24 y = cmplx(epsilon(0._rk), 1._rk, kind=rk)
25 call test% assert_close(x, y)
27 x = cmplx(-1158.1181871905803291, 779.0494065373754893)
28 y = cmplx(-1158.1181871905803291, 779.0494065373754893)
30 call test% assert_equal(x, y)
34 d = d + cmplx(0, epsilon(0.))
36 call test% assert_close(c, d)
38 c = cmplx(1154274.4026509234681726, -461087.8365501734078862)
39 d = cmplx(1154274.4026509234681726, -461087.8365501734078862)
41 call test% assert_equal(c, d)
46 call test% assert_equal(a, b)
51 call test% assert_close(a, b)
53 b(1) = b(1) + cmplx(0._rk, epsilon(
real(b(1))), kind=rk)
55 call test% assert_close(a, b)
Routines to test Fortran programs.