[PATCH] BZ#13889: expl (709.75) wrongly overflows for ldbl-128ibm

Andreas Schwab schwab@linux-m68k.org
Wed Jun 6 16:01:00 GMT 2012


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."



More information about the Libc-alpha mailing list