This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix for logb/logbf/logbl (bz 13954/13955/13956)
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Tue, 01 May 2012 09:32:59 -0300
- Subject: Re: [PATCH] Fix for logb/logbf/logbl (bz 13954/13955/13956)
- References: <4F9EEB79.20408@linux.vnet.ibm.com> <Pine.LNX.4.64.1204302148090.12434@digraph.polyomino.org.uk>
On 04/30/2012 06:53 PM, Joseph S. Myers wrote:
> On Mon, 30 Apr 2012, Adhemerval Zanella wrote:
>
>> + TEST_f_f (logb, 0x0.1p-127, -131);
>> + TEST_f_f (logb, 0x0.01p-127, -135);
>> + TEST_f_f (logb, 0x0.011p-127, -135);
>> +#ifndef TEST_FLOAT
>> + TEST_f_f (logb, 0x0.8p-1022, -1023);
>> + TEST_f_f (logb, 0x0.1p-1022, -1026);
>> + TEST_f_f (logb, 0x0.00111p-1022, -1034);
>> + TEST_f_f (logb, 0x0.00001p-1022, -1042);
>> + TEST_f_f (logb, 0x0.000011p-1022, -1042);
>> + TEST_f_f (logb, 0x0.0000000000001p-1022, -1074);
>> +#endif
> I think it would be a good idea also to have a test for long double with
> wider range, say:
>
> #if defined TEST_LDOUBLE && LDBL_MIN_EXP - LDBL_MANT_DIG <= -16400
> TEST_f_f (logb, 0x1p-16400L, -16400);
> #endif
>
> Also, it would be good to add the same set of tests to the tests for
> ilogb, since both have the same requirements for how subnormals are
> handled (although I don't know of any bugs relating to ilogb and
> subnormals).
>
I'll add the test for wide range, but I think the 'ilogb' tests would be better
to be handled in another patch. I'll test 'ilogb' and send a different patch
if the implementations have the same issue.
--
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