------- Comment #11 from ubizjak at gmail dot com 2007-10-17 12:39 -------
The problem is somewhere around line 212 in induct.f90. Adding some debug code
at the end of the function:
...
! evaluate self-inductance
!
self_l = (mu * turns**2 * l**2 * 2.0_longreal * r)/3.0_longreal *
&
(((tan(alpha)**2-1.0_longreal)*elliptice+elliptick)/sin(alpha) -
&
tan(alpha)**2)
!
print *,"input", mu, turns, l, r, alpha, elliptice, elliptick
print *,"result", self_l
end subroutine self_ind_cir_coil
we obtain:
-O2 -ffast-math
input 1.25663706143591729E-006 166666.66666666666
3.00000000000000006E-003 2.99999999999999989E-002 1.5208379310729538
1.0048458281970889 4.3853871539549072
result 8.51113565610956888E-008
-O2 -ffast-math -ffloat-store:
input 1.25663706143591729E-006 166666.66666666666
3.00000000000000006E-003 2.99999999999999989E-002 1.5208379310729538
1.0048458281970889 4.3853871539548939
result 2.13170362012935939E-002
So, for the same input parameters, the equation above returns the result that
differs in 3 orders of magnitude.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33794