This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PowerPC floating point little-endian [3 of 15]
- From: Andreas Jaeger <aj at suse dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 10 Jul 2013 07:53:08 +0200
- Subject: Re: PowerPC floating point little-endian [3 of 15]
- References: <20130710012435 dot GN2602 at bubble dot grove dot modra dot org> <20130710012552 dot GP2602 at bubble dot grove dot modra dot org>
On 07/10/2013 03:25 AM, Alan Modra wrote:
> Further replacement of ieee854 macros and unions. These files also
> have some optimizations for comparison against 0.0L, infinity and nan.
> Since the ABI specifies that the high double of an IBM long double
> pair is the value rounded to double, a high double of 0.0 means the
> low double must also be 0.0. The ABI also says that infinity and
> nan are encoded in the high double, with the low double unspecified.
> This means that tests for 0.0L, ±Infinity and ±NaN need only check
> the high double.
The change looks fine to me.
> The k_tanl.c change introduces a regression in test-ldouble and
> test-ildoubl.
> +Failure: Test: tan_towardzero (2)
> +Result:
> + is: -2.18503986326151899164e+00 -0x1.17af62e0950f83b50990p+1
> + should be: -2.18503986326151899164e+00 -0x1.17af62e0950f83b50990p+1
> + difference: 4.93038065763132378382e-32 0x1.00000000000000000000p-104
> + ulp : 1.0000
> + max.ulp : 0.0000
>
> This is not due to an error in the patch but because addition of IBM
> long double is not commutative. The final addition in the following
> line happens to passed to __gcc_qadd with the two long double values
> swapped compared to the previous version.
> return z1 + z * (s + z1 * v);
> gcc also swaps other addition and multiplication operands too, but
> this particular one happens to introduce the 1ulp rounding error.
In this case, you should just update the ULPs file, the regression is fine.
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126