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 for logb/logbf/logbl (bz 13954/13955/13956)


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


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