This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Fourth Draft "Unsafe fp optimizations" project description.
- To: <dewar at gnat dot com>
- Subject: Re: Fourth Draft "Unsafe fp optimizations" project description.
- From: Linus Torvalds <torvalds at transmeta dot com>
- Date: Tue, 14 Aug 2001 09:51:35 -0700 (PDT)
- cc: <paubert at iram dot es>, <gcc at gcc dot gnu dot org>, <toon at moene dot indiv dot nluug dot nl>
On Tue, 14 Aug 2001 dewar@gnat.com wrote:
>
> The issue is not accuracy in general, but the requirement that there not
> be a single case in which the result from the hardware is outside ther
> required model interval specified in the ARM. I looked at the Intel
> documentation quite a while ago, and it was statistical in nature,
> and did not have any absolute guarantees. That's what worried me.
I think they _do_ guarantee it, at least for "round to nearest". Just by
virtue of guaranteeing "less than 1 ULP error",
Because, if (for example) "sin()" ever returned a value ourside of [-1,1],
then that would obviously be an error of AT LEAST 1 ULP. Which is a bigger
error than the largest they guarantee. Ergo, the high accuracy guarantees
that they stay in the proper domain.
And they guarantee this for the entire range that they accept as inputs.
There could be bugs, of course. But hey, that's true of _anybody_, so that
argument is absolutely never a valid argument for saying "so we should do
it by hand".
Linus