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 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


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