This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Fix builtin-explog-1.c.
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: gcc-patches at gcc dot gnu dot org, kazu at cs dot umass dot edu
- Date: Sun, 29 Feb 2004 19:13:09 -0500 (EST)
- Subject: Re: [patch] Fix builtin-explog-1.c.
- References: <email@example.com>
> From: Kazu Hirata <firstname.lastname@example.org>
> Attached is a patch to fix builtin-explog-1.c.
> On H8, float is the only floating point math available, and types like
> long double or double are the same as float. Consequently, the
> following test fails by the smallest margin.
> if (EXP(5.0) < (BASE)*(BASE)*(BASE)*(BASE)*(BASE) - PREC \
> || EXP(5.0) > (BASE)*(BASE)*(BASE)*(BASE)*(BASE) + PREC \
> The patch relaxes PREC and PRECL if the target does not actually have
> double or long double.
> Tested on h8300-elf. OK to apply?
> Kazu Hirata
> 2004-02-28 Kazu Hirata <email@example.com>
> * gcc.dg/torture/builtin-explog-1.c (PREC): Make it the same
> as PRECF if sizeof (float) > sizeof (double).
> (PRECL): Make it the same as PRECF if
> sizeof (float) > sizeof (long double).
I can't approve your change, but FWIW as the author of the testcase,
your approach is fine with me (assuming you correct the comparison
problem noted earlier.)
Kaveh R. Ghazi firstname.lastname@example.org