4 ! The partial initialization through data statements was producing
5 ! shape mismatch errors.
7 ! Contributed by Harald Anlauf <anlauf@gmx.de>
12 DOUBLE PRECISION FUNCTION d1mach(i
)
13 INTEGER, INTENT(IN
) :: i
20 DOUBLE PRECISION :: dmach(5)
22 EQUIVALENCE (dmach(1),small(1))
23 EQUIVALENCE (dmach(2),large(1))
24 EQUIVALENCE (dmach(3),right(1))
25 EQUIVALENCE (dmach(4),diver(1))
26 EQUIVALENCE (dmach(5),LOG10(1))
28 DATA small(1),small(2) / 0, 1048576 /
29 DATA large(1),large(2) / -1, 2146435071 /
30 DATA right(1),right(2) / 0, 1017118720 /
31 DATA diver(1),diver(2) / 0, 1018167296 /
32 DATA LOG10(1),LOG10(2) / 1352628735, 1070810131 /
37 DOUBLE PRECISION FUNCTION foo (x
)
38 DOUBLE PRECISION, INTENT(IN
) :: x
39 foo
= SQRT (d1mach(4))