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] PowerPC - Fix PPC64 floorl


Adhemerval Zanella <azanella@linux.vnet.ibm.com> writes:

> The commit 2460d3aa21f04cdf28497683bd3e29183189f779 added some additional tests for powl intended
> to check a correction for i386/x86_64. The tests however started to trigger some issues with powl in
> PPC64. I tracked the issue an it is due the floorl assembly version for PPC64 that fails to correctly
> floor some values large than 2**52. 

This is BZ#13886.

> --- a/sysdeps/ieee754/ldbl-128ibm/s_floorl.c
> +++ b/sysdeps/ieee754/ldbl-128ibm/s_floorl.c
> @@ -27,9 +27,13 @@ long double
>  __floorl (long double x)
>  {
>    double xh, xl, hi, lo;
> +  double two52 = 0x10000000000000LL;
>  
>    ldbl_unpack (x, &xh, &xl);
>  
> +  if (__builtin_expect(__builtin_fabs (x) < two52, 1))

__builtin_fabsl (x) or __builtin_fabs (xh)?

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]