Bug 1064066
Description
Patsy Griffin
2014-02-11 22:37:48 UTC
Created attachment 1009868 [details]
Output of of glibc 2.17-79 test-ldouble on powerpc64.
Created attachment 1009869 [details]
Output of glibc-2.17-79 test-ldouble built with -mtune=power8 on powerpc64.
Created attachment 1009931 [details]
Output of glibc 2.17-48 test-ldouble on powerpc64.
Comment on attachment 1009868 [details]
Output of of glibc 2.17-79 test-ldouble on powerpc64.
Wrong output.
Comment on attachment 1009869 [details]
Output of glibc-2.17-79 test-ldouble built with -mtune=power8 on powerpc64.
Wrong output.
Created attachment 1010310 [details] Output of of glibc 2.17-79 test-ldouble on powerpc64. The correct output of glibc 2.17-79 test-ldouble on powerpc64 (not sure why the results in attachment 1009868 [details] were different, perhaps dues to an operator error of some sort). Created attachment 1010311 [details]
Output of of glibc 2.17-79 test-ldouble built with -mtune=power8.
All but three of the failures the original report for glibc-2.17-48 (i.e., those in attachment 1009931 [details]) have since disappeared. Of the remaining failures those that do persist in the most recent test results of glibc-2.17-79 are the following two: Failure: Real part of: clog (0x0.fffffffffffff8p0 + 0x0.fffffffffffff8p-1000 i) == -1.110223024625156602053389888482372171810e-16 + 9.332636185032188789900895447238171696171e-302 i: Exception "Underflow" not set Failure: Real part of: csqrt (0x1p-500 + 0x1p-1074 i) == 5.527147875260444560247265192192255725514e-76 + 4.469444793151709302716387622440056066334e-249 i: Exception "Underflow" set In addition, the failure below in the glibc-2.17-48 report: Failure: Test: Imaginary part of: clog (0xe33f66c9542ca25cc43c867p-95 + 0x7f35a68ebd3704a43c465864p-95 i) == 4.1101771307217268747345114262406964584250e-56 + 1.4596065864518742494094402406719567059585 i Result: is: 1.45960658645187424941e+00 0x1.75a8c6f9d64568662d14p+0 should be: 1.45960658645187423687e+00 0x1.75a8c6f9d645677edb9cp+0 difference: 2.96337233823640665070e+42 0x1.10248c82100a00000000p+141 ulp : 120208663144483600888684377398986721799491796043926053442266675642814693376.0000 max.ulp : 0.0000 Maximal error of real part of: clog is : 1 ulp accepted: 1 ulp Maximal error of imaginary part of: clog is : 120208663144483600888684377398986721799491796043926053442266675642814693376 ulp accepted: 2 ulp has been replaced by the following failure: Failure: Test: Imaginary part of: clog (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i) == 8.3076914081087805757422664530653247447136e-30 + 1.2072712126771536614482822173033535043206 i Result: is: 1.20727121267715366145e+00 0x1.350fb9e7d9c340e6bc99p+0 should be: 1.20727121267715364894e+00 0x1.350fb9e7d9c340000000p+0 difference: 1.85210803104869353729e+41 0x1.10248f96102480000000p+137 ulp : 7513042743188481597437085793713352561339295191781347309079712734038196224.0000 max.ulp : 0.0000 Maximal error of real part of: clog is : 1 ulp accepted: 1 ulp Maximal error of imaginary part of: clog is : 7513042743188481597437085793713352561339295191781347309079712734038196224 ulp accepted: 2 ulp In the current failure there appear to be a couple of issues: 1) the expected result (on the "Failure:" line after the "==" symbol) matches more closely the value printed on the "is:" line than on the "should be:" line, and 2) the difference looks wrong: 1.20727121267715366145 - 1.20727121267715364894 is less than one (1.250826209073797372025617e-17 to be exact, not 1.85e+41). However, the difference in ULP is 9376476830129752, which is greater than the maximum allowed difference. The WolframAlpha online calculator computes the same result as glibc when input decimal equivalents of the hex floating arguments (http://www.wolframalpha.com/input/?i=log%283.555711807950272529410540e-01+%2B+I9.346492044548211364229928e-01%29) so it seems that the expected result in this test case is wrong. In addition, the latest trunk computes the same result and the test doesn't fail (though thousands of others do). Finally, after removing all the other tests from libm-test.c except the failing clog one, recompiling and re-running the test program the failures disappear. The relevant portion of the verbose output of the test looks like this: Test: Imaginary part of: clog (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i) == 8.3076914081087805757422664530653247447136e-30 + 1.2072712126771536614482822173033535043206 i Result: is: 1.20727121267715366145e+00 0x1.350fb9e7d9c340e6bc99p+0 should be: 1.20727121267715366145e+00 0x1.350fb9e7d9c340e6bc99p+0 difference: 0.00000000000000000000e+00 0x0.00000000000000000000p+0 ulp : 0.0000 max.ulp : 0.0000 Maximal error of real part of: clog is : 1 ulp accepted: 1 ulp Maximal error of imaginary part of: clog is : 0 ulp accepted: 2 ulp Clearly, something's not right with the code emitted for the full test. Created attachment 1010401 [details]
Small test showing the output of clogl and csqrtl for arguments of interest.
Decorating the functions declared noinline in the patch for bug 1182355 with attribute noclone reduces the failures in the test to the following two: testing long double (without inline functions) Failure: Real part of: clog (0x0.fffffffffffff8p0 + 0x0.fffffffffffff8p-1000 i) == -1.110223024625156602053389888482372171810e-16 + 9.332636185032188789900895447238171696171e-302 i: Exception "Underflow" not set Failure: Real part of: csqrt (0x1p-500 + 0x1p-1074 i) == 5.527147875260444560247265192192255725514e-76 + 4.469444793151709302716387622440056066334e-249 i: Exception "Underflow" set Test suite completed: 6272 test cases plus 5264 tests for exception flags executed. 2 errors occurred. Extracting those two test cases into the small test program of their own (in attachment 1010401 [details]) and building and running it against glibc-2.17-79 produces the following output: clogl (9.999999999999998889776975e-01 + 9.332636185032187753770138e-302 i) result: -1.110223024625156602053390e-16 + 9.332636185032188789900895e-302 i expected: -1.110223024625156540423632e-16 + 9.332636185032188789900895e-302 i underflow: 0 csqrtl (3.054936363499604682051979e-151 + 4.940656458412465441765688e-324 i) result: 5.527147875260444560247265e-76 + 4.469444793151709302716388e-249 i expected: 5.527147875260444560247265e-76 + 4.469444793151709302716388e-249 i underflow: 1 The only difference between glibc-2.17-79 and trunk is that clogl call doesn't raise the underflow exception. Created attachment 1011902 [details] Proposed testsuite-only patch to reduce the number of failures to the two mentioned in comment #18. Created attachment 1011903 [details] Proposed testsuite-only patch to reduce the number of failures to the two mentioned in comment #18. Patch committed in 75d09cf9849c9251013ca68497ab7c6a1b083aa3 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-2199.html |