This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH]: PR29335 evaluate transcendentals at compile-time using MPFR [take 2]
- From: Roger Sayle <roger at eyesopen dot com>
- To: "Kaveh R. GHAZI" <ghazi at caip dot rutgers dot edu>
- Cc: joseph at codesourcery dot com, <richard dot guenther at gmail dot com>, <sgk at troutmask dot apl dot washington dot edu>, <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 14 Oct 2006 10:17:40 -0600 (MDT)
- Subject: Re: [PATCH]: PR29335 evaluate transcendentals at compile-time using MPFR [take 2]
On Sat, 14 Oct 2006, Kaveh R. GHAZI wrote:
> There are already checks in the testsuite to test simple args (mainly 0.0)
> for sin, cos and tan in gcc.dg/torture/builtin-math-1.c. I've also
> verified some non-zero values and the -frounding-math/exact stuff by hand.
> I'll add a few more tests, including checks for -frounding-math,
> exactness, etc. Anyone want to recommend things to check?
I'm not sure if you've come across it before but Gaston Gonnet (one of
the original developers of Maple) has a transcendental accuracy benchmark
at http://www.inf.ethz.ch/personal/gonnet/FPAccuracy/Analysis.html that's
available as source code under the GPL. This tests the difficult corner
cases of many functions where runs of zeros or ones past the end of
the IEEE mantissa need to be correctly rounded to get the intended
I used the "sqrt" portion of this benchmark to verify perfect rounding
of real_sqrt when it was added to GCC:
The only things that needed to be done was a bit of sed/awk to transform
the benchmark such that all the arguments are visible to the compiler at
compile-time, by unrolling the loops and instantiating table values.
I Cc'd Gaston on the above posting, and e-mailed him about including
his tests in the GCC testsuite, but unfortunately I never heard back.
I hope this helps.