This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix ldbl128ibm fmodl for subnormals
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>, "David S. Miller" <davem at davemloft dot net>
- Date: Tue, 05 Jun 2012 14:31:40 -0300
- Subject: Re: [PATCH] Fix ldbl128ibm fmodl for subnormals
- References: <4FCCD216.1060103@linux.vnet.ibm.com> <m24nqp6936.fsf@igel.home>
On 06/05/2012 01:02 PM, Andreas Schwab wrote:
> Adhemerval Zanella <azanella@linux.vnet.ibm.com> writes:
>
>> Current subnormal tests for fmod (TEST_ff_f (fmod, 0x0.fffffffffffffp-1022L, 0x1p-1074L, plus_zero))
>> fails for ldbl-128ibm. This patch fixes it and it is related to commit 'Fix fmod for subnormals'
>> (c5bfe3d5ba29d36563f1e4bd4f8d7336093ee6fc).
>>
>> Tested on ppc32 and ppc64.
> How did you test it? I get an infinite loop here:
>
> while(hx<0x0001000000000000LL) { /* normalize x */
> hx = hx+hx+(lx>>63); lx = lx+lx;
> iy -= 1;
> }
You are correct and I have commit a non-intended older version of the patch that
contains the mistakes lines:
- int64_t n,hx,hy,hz,ix,iy,sx,i;
- u_int64_t lx,ly,lz;
+ int64_t n,hx,hy,hz,ix,iy,sx;
+ u_int64_t lx,ly,lz, i;
In my correct patch 'i' was not supposed to unsigned in any way. The patch I was intended to
does not contain the above modifications. How should I proceed in this case?
--
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