From: Andreas Schwab Date: Wed, 17 Jul 2013 12:53:24 +0000 (+0200) Subject: Fix cbrtl for ldbl-96 X-Git-Tag: glibc-2.19~900 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ca0a6bc4c5c53aa6c4a735c36336408a06b8cd89;p=thirdparty%2Fglibc.git Fix cbrtl for ldbl-96 --- diff --git a/ChangeLog b/ChangeLog index 07617d18970..bf48b5d5b0b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2013-08-13 Andreas Schwab + + [BZ #15749] + * sysdeps/ieee754/ldbl-96/s_cbrtl.c (__cbrtl): Use fabsl instead + of fabs. + * math/libm-test.inc (cbrt_test_data) [TEST_LDOUBLE && + LDBL_MAX_EXP >= 16384]: Add tests for it. + 2013-08-12 David S. Miller * version.h (RELEASE): Set to "development". diff --git a/NEWS b/NEWS index 3fd5027ca69..b231e9747fc 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,7 @@ Version 2.19 * The following bugs are resolved with this release: + 15749 Version 2.18 diff --git a/math/libm-test.inc b/math/libm-test.inc index 2324d4fd522..851f1beafce 100644 --- a/math/libm-test.inc +++ b/math/libm-test.inc @@ -5845,6 +5845,11 @@ static const struct test_f_f_data cbrt_test_data[] = TEST_f_f (cbrt, -27.0, -3.0), TEST_f_f (cbrt, 0.9921875L, 0.997389022060725270579075195353955217L), TEST_f_f (cbrt, 0.75L, 0.908560296416069829445605878163630251L), + +#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384 + TEST_f_f (cbrt, 0x1p16383L, 0x1p5461L), + TEST_f_f (cbrt, 0x1p-16383L, 0x1p-5461L), +#endif }; static void diff --git a/sysdeps/ieee754/ldbl-96/s_cbrtl.c b/sysdeps/ieee754/ldbl-96/s_cbrtl.c index b481c84eb07..e6b2f2540ef 100644 --- a/sysdeps/ieee754/ldbl-96/s_cbrtl.c +++ b/sysdeps/ieee754/ldbl-96/s_cbrtl.c @@ -45,7 +45,7 @@ __cbrtl (long double x) int xe; /* Reduce X. XM now is an range 1.0 to 0.5. */ - xm = __frexpl (fabs (x), &xe); + xm = __frexpl (fabsl (x), &xe); /* If X is not finite or is null return it (with raising exceptions if necessary.