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: [PATCH] BZ#13889: expl (709.75) wrongly overflows for ldbl-128ibm


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


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