This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] PPC fixes for long double
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Steven Munroe <munroesj at us dot ibm dot com>
- Cc: libc-alpha at sources dot redhat dot com, ppc64-glibc at linux dot ibm dot com
- Date: Tue, 31 Jan 2006 17:23:10 +0100
- Subject: Re: [PATCH] PPC fixes for long double
- References: <43DF8C73.3090602@us.ibm.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Jan 31, 2006 at 10:12:35AM -0600, Steven Munroe wrote:
> This patch resolves the ulps failures in cprojl, ctanhl, ctanl, ceill,
> floorl, and the Bessel functions (j0, j1, jn, y0, y1, yn).
>
> The double double runtime does not propigate -0.0 correctly in some
> case. So I have to add fixup code to some complex functions. Similarly
> ceill, floorl needed explicite handling for the correct sign of 0.0;
>
> Also found that the k_cosl, k_sinl, k_sincosl did not compute the index
> into the __sincosl_table correcly for double double. The result is bad
> values for larger radian inputs and cause the Bessel function failures.
> Hacked around it by converting the high 32-bit (integer form) of the
> high double to ieee extended and used the index calc from the ldbl-128
> (ieee extended) version.
Great to see Bessel fns resolved. But could you avoid decreasing ulps
in the ulps file? While on ppc32 we require GCC 4.1+ (if Mark accepts
the changes) now, on ppc64 we do not and some older GCCs might result
in bigger ulps. So *double/*float numbers really shouldn't change
when touching only long double routines.
Any perl hackers around? Maybe math/gen-libm-test.pl could have a new
option, where it would be additionally given filename of the old
ulps file and would compute maximum between the old ulps file and
the newly generated ulps.
> --- libc24-cvstip-20060130b/sysdeps/powerpc/fpu/libm-test-ulps 2006-01-30 16:29:27.000000000 -0600
> +++ libc24/sysdeps/powerpc/fpu/libm-test-ulps 2006-01-30 18:22:09.562194992 -0600
> @@ -37,16 +37,9 @@
> ldouble: 1
>
> # cacosh
> -Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
> -double: 1
> -float: 7
> -idouble: 1
> -ifloat: 7
> Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
> -double: 1
> -float: 3
> -idouble: 1
> -ifloat: 3
> +float: 1
> +ifloat: 1
Jakub