This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: -ffast-math and gfortran
On Sunday 04 June 2006 17:43, Steve Kargl wrote:
> On Sun, Jun 04, 2006 at 05:37:55PM -0400, Iwan Kawrakow wrote:
> >
> >> What bothers me about all this discussion on -ffast-math is
> >> what is the driver for using it? What is the percentage gain
> >> in execution speed? Is it really that important that a
> >> computation gets done in 30 minutes rather than 35 minutes?
> >>
> >
> > my group spends on average ~$20k/year to keep our computing
> > cluster up do date. -ffast-math gives ~10% faster execution for
> > our type of problem (Monte Carlo simulation of coupled electron-
> > photon transport). I.e., -ffast-math is worth ~$2000/year to us.
> >
>
> How much are correct answer worth?
>
Correct answer meaning what?
A Monte Carlo-computed answer is subject to statistical
uncertainty. For our time of problem it takes a *very* long time to
obtain an uncertainty of better than, say, 0.01% (i.e. one part in 10000).
Naturally, we have verified that our codes produce the same
results with and without -ffast-math within the statistical uncertainties.
Not using -ffast-math is of course handy and necessary while
developing a code. Apart from that, I personally think that a program that does not work with
-ffast-math is broken, not the other way around.
Or do you think that people could bot compute
anything with their computers before the IEEE came along and invented
a standard of how math functions should behave?
Ivan