This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] BZ#13889: expl (709.75) wrongly overflows for ldbl-128ibm
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Wed, 06 Jun 2012 18:00:56 +0200
- Subject: Re: [PATCH] BZ#13889: expl (709.75) wrongly overflows for ldbl-128ibm
- References: <4FC7D52E.8080502@linux.vnet.ibm.com>
Adhemerval Zanella <azanella@linux.vnet.ibm.com> writes:
> @@ -235,10 +233,22 @@ __ieee754_expl (long double x)
> return __ieee754_expl_proc2 (origx);
> }
> */
> - if (!unsafe)
> - return result;
> - else
> - return result * scale_u.d;
> + if (unsafe)
> + {
> + /* The scale with denormal number might generated undeflow for
s/undeflow/underflow
> + first high double multiplication. The exception holding is
> + to avoid it. */
> + if (result.ieee.exponent + scale_u.ieee.exponent <
> + IBM_EXTENDED_LONG_DOUBLE_BIAS)
Please fold before the operator, not after.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."