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 3]

On Fri, 20 Oct 2006, Joseph S. Myers wrote:

> On Fri, 20 Oct 2006, Kaveh R. GHAZI wrote:
> > When using this precision, for the sin tests I was getting three of
> > the results with errors of 0.50000 ... 000N, i.e. ever so slightly
> > above 0.5.  To put that in context, sin has 1257 tests, cos has 1418,
> > tan has 1596.  So 1254 of the sin tests were perfect, and the cos &
> > tan results were all 100% perfect.
> This sounds like an MPFR bug, which we should report upstream and get an
> upstream fix for rather than working around.  (I don't think this MPFR bug
> need block adding to GCC a patch which uses the precision of the relevant
> type rather than some magic higher precision; we can increase the required
> MPFR version to ensure a fix later.)

Right, we can only do that when the next release of MPFR is released,
(assuming this is an MPFR bug, and assuming the fix is included).  I'll
get the three problematic argument values and see if I can isolate the
problem.  It may be localized to sin, the MPFR page has a cumulative patch
which mentions a bug in sin rounding.  I'll try that out and see if it
fixes the bug.  But even if that fixes it, we can't put in a version check
until the next release comes out.  I don't want to hold up this GCC
functionality in the mean time and hopefully that wasn't your intention

We do have a history of including MPFR workarounds in gfortran wrapped in
version checks.  Just look for GFC_MPFR_TOO_OLD.  I can add something
similar if, and once, it becomes appropriate.

Are there any other issues with the patch, or is it okay for stage1?

Kaveh R. Ghazi

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