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] Fix float range reduction problems (#14283)


On 07/06/2012 07:01 PM, Andreas Schwab wrote:
> This fixes the same bug for ppc.
>
> Andreas.
>
> 	[BZ #14283]
> 	* sysdeps/powerpc/fpu/k_rem_pio2f.c (__fp_kernel_rem_pio2f): Shift
> 	by 7 not 8 to examine high bit of fractional part.
>
> diff --git a/sysdeps/powerpc/fpu/k_rem_pio2f.c b/sysdeps/powerpc/fpu/k_rem_pio2f.c
> index 2060642..c388f25 100644
> --- a/sysdeps/powerpc/fpu/k_rem_pio2f.c
> +++ b/sysdeps/powerpc/fpu/k_rem_pio2f.c
> @@ -1,5 +1,5 @@
>  /* k_rem_pio2f.c -- float version of e_rem_pio2.c
> -   Copyright (C) 2011 Free Software Foundation, Inc.
> +   Copyright (C) 2011-2012 Free Software Foundation, Inc.
>     This file is part of the GNU C Library.
>     Contributed by Adhemerval Zanella <azanella@br.ibm.com>, 2011
>
> @@ -153,7 +153,7 @@ recompute:
>        ih = iq[jz - 1] >> (7 - q0);
>      }
>    else if (q0 == 0)
> -    ih = iq[jz - 1] >> 8;
> +    ih = iq[jz - 1] >> 7;
>    else if (z >= 0.5)
>      ih = 2;
>
You were faster than me, I was intending to send this along with some ulp updates and fixes
for long double after bz14328 additional tests.


-- 
Adhemerval Zanella Netto
  Software Engineer
  Linux Technology Center Brazil
  Toolchain / GLIBC on Power Architecture
  azanella@linux.vnet.ibm.com / azanella@br.ibm.com
  +55 61 8642-9890


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