This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: Fix ctan, ctanh overflow (bug 11521)


On Wed, Apr 25, 2012 at 12:43 PM, Adhemerval Zanella
<azanella@linux.vnet.ibm.com> wrote:
> I tracked down the ulps issues your saw they are related to expression 'h*(t+t/(t+one))'
> on sysdeps/ieee754/ldbl-128ibm/e_sinhl.c being rounding in newer GCCs (I tested using
> GCC 4.3.4 and got the ulp issues with GCC 4.6.4) to more approximated values, but the
> for ctanl/ctanhl it generates more ULPs. Below there is a newer patch that simply break
> down the expression in two subexpressions and get rid off ulps issues.

Ok, I see that we have a few larger ulps changes as a result....

>
>
> 2012-04-25 ÂAdhemerval Zanella Â<azanella@linux.vnet.ibm.com>
>
> Â Â Â Â[BZ #11521]
> Â Â Â Â* sysdeps/ieee754/ldbl-128ibm/s_ctanhl.c: (__ctanhl) Avoid internal
> Â Â Â Âoverflow or cancellation in calculating denominator.
> Â Â Â Â* sysdeps/ieee754/ldbl-128ibm/s_ctanl.c: (__ctanl) Likewise.
> Â Â Â Â* sysdeps/ieee754/ldbl-128ibm/e_sinhl.c: (__ieee754_sinhl) Breaking
> Â Â Â Âdown expression to avoid unexpected rounding in newer GCCs.
> Â Â Â Â* sysdeps/powerpc/fpu/libm-test-ulps: Update for ctan, ctanh fix.
>

Proper form is:

* sysdeps/ieee754/ldbl-128ibm/s_ctanhl.c (__ctanhl): Avoid internal
overflow or cancellation in calculating denominator.

Notice the placement of the colon.  I'll fix them up this time.

Otherwise the patch itself looks good and cleans up the problem.  I'll
push upstream shortly.

Ryan S. Arnold


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