This is the mail archive of the
mailing list for the GCC project.
Re: What is acceptable for -ffast-math? A numerical viewpoint
- To: gcc at gcc dot gnu dot org
- Subject: Re: What is acceptable for -ffast-math? A numerical viewpoint
- From: Ross Smith <ross dot s at ihug dot co dot nz>
- Date: Mon, 06 Aug 2001 11:46:04 +1200
- Organization: Ihug
- References: <20010805223717.A8CE1F2B78@nile.gnat.com>
> It was just an example, if you really think that it is acceptable to
> allow any transofmration that is valid for real arithmetic under all
> circumstances, then we are too far to even have a discussion, since
> this criterion is completely unworkable for many reasons. Again,
> briefly, it would allow transformations that would cause all programs
> to immediately generate overflows. You can't really mean that you
> support this criterion without any exceptions.
And you're still asserting that and simply expecting me to take your
word for it, presumably because you're a Real Expert and I'm a mere peon
who writes (ugh) games. I keep asking you to provide evidence for that
assertion and you keep failing to do so.
> Going back to the NR example, there is nothing wrong at all about
> programming an NR iteration to exact equality if analysis shows this
> is reliable, since it is often the fastest way of doing things.
"If analysis shows this is reliable." But your example was one where it
was blatantly obvious that it _wasn't_ reliable. It's the same old
problem again: you keep coming up with examples that rely on the
assumption that I'm incapable of doing the analysis.
I'll throw out the challenge once again: Come up with a concrete example
in which "pretend they're real numbers" leads to pathological behaviour.
Without introducing blatantly extreme values like DBL_MAX or 10**1000,
without applying gratuitous transformations that are only there to break
the code and serve no plausible optimisation purpose (e.g. multiplying
both sides by some large factor), and (and I want to emphasise this yet
again because it's the root of your misapprehension) _without assuming
that the coder doesn't understand floating point as well as you do_.
Until you actually come up with such an example (and not merely claim
that it exists), I stand by my position that "pretend they're real
numbers" is a reasonable thing to want to be able to tell the compiler.
Ross Smith <email@example.com> The Internet Group, Auckland, New Zealand
"Unix has always lurked provocatively in the background of the operating
system wars, like the Russian Army." -- Neal Stephenson