This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: PR29335 evaluate transcendentals at compile-time using MPFR [take 2]

Hi Kaveh,

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 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]