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: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Cc: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Mon, 30 Apr 2012 21:53:04 +0000 (UTC)
- Subject: Re: [PATCH] Fix for logb/logbf/logbl (bz 13954/13955/13956)
- References: <4F9EEB79.20408@linux.vnet.ibm.com>
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).
--
Joseph S. Myers
joseph@codesourcery.com