This is the mail archive of the
mailing list for the GCC project.
Re: why not consfold sin(const)
On Sep 19, 2004, at 5:31 PM, Robert Dewar wrote:
Yes; but someone (I forget who) early in this thread said it was
"impossible" since you couldn't simulate target-specific elementary
functions (presumably they were assuming that the target would have
ill-defined or buggy routines).
Ah, now I see the discussion. This thread is actually specifically
about the possibility of doing this in -ffast-math mode. My
"impossible" comment was a note about doing it without this
mode being turned on, and yes it is impossible to simulate
target routines and precompute at compile-time the exact
values you will get at run-time (because the algorithms are
not documented -- which is not quite the same as ill-defined :-)
Well, they *could* be reverse engineered, as there are a finite
number of possible inputs. You'd have to want this an awful lot
to attempt it, though.