This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Sine and Cosine Accuracy
On 2005-05-26 12:04:04 -0400, Scott Robert Ladd wrote:
> I've never quite understood the necessity for performing trig
> operations on excessively large values, but perhaps my problem
> domain hasn't included such applications.
This can happen in some numerical applications (the same expressions
are used for small and large values). An accurate value wouldn't
necessarily be meaningful, but some properties can be necessary or
at least useful, such as:
* Mathematical properties, e.g. |sin(x)| <= 1 and sin²x + cos²x = 1.
* Properties concerning the distribution of the values of sin(x) for
large values of x.
* Reproducibility of the results across different platforms (may be
useful for debugging purpose, in particular).
--
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA