This is the mail archive of the
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: libc-alpha at sourceware dot org
- Date: Tue, 01 May 2012 09:38:34 -0300
- Subject: Re: [PATCH] Fix for logb/logbf/logbl (bz 13954/13955/13956)
- References: <4F9EEB79.firstname.lastname@example.org> <4F9F94F7.email@example.com>
On 05/01/2012 04:47 AM, Andreas Jaeger wrote:
> On 04/30/2012 09:43 PM, Adhemerval Zanella wrote:
>> POSIX 2008 states that if the input for 'logb[f|l]' is a subnormal number, it should
>> be treated as it were normalized. It means the implementation should calculate the
>> log2 of mantissa and add it subnormal exponent number (-126 for float and -1022 for
>> double and IBM long double). This patch takes care of that.
> On which platforms was this tested?
I tested on PPC32 and PPC64.
>> 2012-04-30 Adhemerval Zanella<firstname.lastname@example.org>
>> [BZ #13954, BZ#13955, and BZ #13956]
> We normally write:
> [BZ #13954]
> [BZ #13955]
> [BZ #13956]
I'll fix that.
>> * sysdeps/ieee754/dbl-64/s_logb.c (__logb): Fix for subnormal number.
>> * sysdeps/ieee754/flt-32/s_logbf.c (__logf): Likewise.
>> * sysdeps/ieee754/ldbl-128ibm/s_logbl.c (__logbl): Likewise.
>> * math/libm-test.inc (logb_test) : Additional logb tests.
> What about the dbl-64/wordsize-64, ldbl-96 and ldbl-128 routines? Do
> they have the same problem and need fixing as well?
> Your code change looks fine. Could you check the other implementations
> as well and resubmit then?
I didn't check on above implementation but I'll do.
Adhemerval Zanella Netto
Linux Technology Center Brazil
Toolchain / GLIBC on Power Architecture
email@example.com / firstname.lastname@example.org
+55 61 8642-9890