- sputnik/Conformance/15_Native_Objects/15.8_Math/15.8.2/15.8.2.16_sin/S15.8.2.16_A7.html - sputnik/Conformance/15_Native_Objects/15.8_Math/15.8.2/15.8.2.18_tan/S15.8.2.18_A7.html --- /tmp/layout-test-results/sputnik/Conformance/15_Native_Objects/15.8_Math/15.8.2/15.8.2.16_sin/S15.8.2.16_A7-expected.txt 2012-06-07 03:35:10.838039831 -0700 +++ /tmp/layout-test-results/sputnik/Conformance/15_Native_Objects/15.8_Math/15.8.2/15.8.2.16_sin/S15.8.2.16_A7-actual.txt 2012-06-07 03:35:10.825900458 -0700 @@ -1,6 +1,6 @@ S15.8.2.16_A7 -PASS +FAIL SputnikError: x = 6.283185307179586 libc.sin(x) = -2.4492935982947064e-16 Math.sin(x) = -2.4492127076447545e-16 Math.abs(libc.sin(x) - Math.sin(x)) > 1.9721522630525295e-31 TEST COMPLETE --- /tmp/layout-test-results/sputnik/Conformance/15_Native_Objects/15.8_Math/15.8.2/15.8.2.18_tan/S15.8.2.18_A7-expected.txt 2012-06-07 03:35:10.946038911 -0700 +++ /tmp/layout-test-results/sputnik/Conformance/15_Native_Objects/15.8_Math/15.8.2/15.8.2.18_tan/S15.8.2.18_A7-actual.txt 2012-06-07 03:35:10.946038911 -0700 @@ -1,6 +1,6 @@ S15.8.2.18_A7 -PASS +FAIL SputnikError: x = -1.5707963267948966 libc.tan(x) = -16331239353195370 Math.tan(x) = -16331778728383844 Math.abs(libc.tan(x) - Math.tan(x)) > 8 TEST COMPLETE
Investigated the issue. sin on x87 and SSE2 based libc differs. The test should allow a bigger difference for this test case. What do you think, Alexey? Note: 6.283185307179586 = 2*PI
I don't know anything specific about these tests or sin() behavior in JavaScript. Sounds like maybe one cannot use such versions of libc to implement JavaScript then.
After calculating a bit on the error I can safely say this is not the standard 80bit vs 64bit precision error. The values we get on 32bit here only have the precision of 32bit float. At some point we must be losing half the precision.
If I run the online test262 tests (the successor to sputnik) at http://test262.ecmascript.org/#, I don't get any errors in Chapter 15 even when using a build that fails the Chapter 15 tests in WebKit. So the tests might have been revised or removed, but I haven't been able to find a place to download test262 or read the changelog yet.
Ah, found it: https://github.com/tronical/test262/commit/590224b1c929c84b1de59fa633f6c5275d28c499#test/suite/ch15/15.8/15.8.2/15.8.2.16/S15.8.2.16_A7.js
*** Bug 43568 has been marked as a duplicate of this bug. ***
Created attachment 199227 [details] Patch
Created attachment 199228 [details] Patch uploaded unrelated changed
Comment on attachment 199228 [details] Patch I'm r+ing it since the test update looks fine, but it seems like we have rarely updated our copy of those tests before. If Allan can wait a couple of days before landing it, feel free to r- it until then if this isn't the right thing to do.
Looks OK to me.
Comment on attachment 199228 [details] Patch Clearing flags on attachment: 199228 Committed r150250: <http://trac.webkit.org/changeset/150250>
All reviewed patches have been landed. Closing bug.