This is the mail archive of the
`gcc@gcc.gnu.org`
mailing list for the GCC project.

Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|

Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |

*To*: Gabriel Dos_Reis <gdosreis at sophia dot inria dot fr>*Subject*: Re: What is acceptable for -ffast-math? (Was: associative law in combine)*From*: Toon Moene <toon at moene dot indiv dot nluug dot nl>*Date*: Wed, 01 Aug 2001 23:18:39 +0200*CC*: Alexandre Oliva <aoliva at redhat dot com>, Gabriel Dos Reis <gdr at codesourcery dot com>, Gabriel Dos_Reis <Gabriel dot Dos_Reis at sophia dot inria dot fr>, Linus Torvalds <torvalds at transmeta dot com>, Tim Hollebeek <tim at hollebeek dot com>, Theodore Papadopoulo <Theodore dot Papadopoulo at sophia dot inria dot fr>, dewar at gnat dot com, amylaar at redhat dot com, gcc at gcc dot gnu dot org, moshier at moshier dot ne dot mediaone dot net, tprince at computer dot org*Organization*: Moene Computational Physics, Maartensdijk, The Netherlands*References*: <20010801122417.A2509@cj44686-b.reston1.va.home.com> <Pine.LNX.4.33.0108010929020.20829-100000@penguin.transmeta.com> <15208.15111.761855.922613@perceval.inria.fr> <orr8uvzm2c.fsf@feijoada.lsd.ic.unicamp.br> <flvgk7hbli.fsf@jambon.cmla.ens-cachan.fr> <or66c7zjj7.fsf@feijoada.lsd.ic.unicamp.br> <15208.25047.127984.580486@perceval.inria.fr>

Gabriel Dos_Reis wrote: > I don't consider 0.5 * DBL_MAX to be at the "very limits of the number > space". Gaby, I'll try a different approach - I'm not going to say you are an <elided> or your analysis is wrong, flawed, or biased. I'm just going to point you at the topic of this thread: "What is acceptable for -ffast-math ?". Now, try for a moment to think with me. During the hoolabaloo around the Pentium FDIV error, I actually went into our weather forecasting code to count the floating point divisions per grid cell per time step (70). The grand total for the whole forecast period was 2.2x10^9. That was end-of-1994. Nowadays, we have about 15 times more grid cells and a 33 % longer forecast period. Because I don't want to do this counting exercise again, I'll just assume the same number of divisions per grid cell, per time step, i.e. 70. That makes the total 20 x 2.2 x 10^9 ~ 0.5 x 10^11 divisions per forecast. If we further assume that: 1) All of these divisions are of the form that allow the transformation. 2) Some forecast will hit your example. 3) The probability distribution for this hit is uniform (this assumption is doubtful, because of the value involved). this means that one in 2^53 / (0.5x10^11) ~ 10^5 forecasts will hit the error. I'm sorry, but I do not have the time to wait for the off-chance that this error will occur, so I'll happily apply this transformation. Now, even given this, I would certainly heed Roberts advice that the transformation should actually be a perceptable "optimisation". In our case, I doubt this (but then, I - personally - am not interested in anything less than a 10 % improvement). Cheers, -- Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290 Saturnushof 14, 3738 XG Maartensdijk, The Netherlands Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)

**References**:**Re: What is acceptable for -ffast-math? (Was: associative law in combine)***From:*Tim Hollebeek

**Re: What is acceptable for -ffast-math? (Was: associative law incombine)***From:*Linus Torvalds

**Re: What is acceptable for -ffast-math? (Was: associative law incombine)***From:*Gabriel Dos_Reis

**Re: What is acceptable for -ffast-math? (Was: associative law in combine)***From:*Alexandre Oliva

**Re: What is acceptable for -ffast-math? (Was: associative law in combine)***From:*Gabriel Dos Reis

**Re: What is acceptable for -ffast-math? (Was: associative law in combine)***From:*Alexandre Oliva

**Re: What is acceptable for -ffast-math? (Was: associative law in combine)***From:*Gabriel Dos_Reis

Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|

Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |