Bug 88519

Summary: 2 math sputnik test fail on 32 bit
Product: WebKit Reporter: Csaba Osztrogonác <ossy>
Component: JavaScriptCoreAssignee: Allan Sandfeld Jensen <allan.jensen>
Status: RESOLVED FIXED    
Severity: Normal CC: allan.jensen, ap, barraclough, commit-queue, ggaren, gyuyoung.kim, jturcotte, mrobinson, oliver, rakuco, zherczeg
Priority: P2 Keywords: Qt, QtTriaged
Version: 420+   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 87008    
Attachments:
Description Flags
Patch
none
Patch none

Csaba Osztrogonác
Reported 2012-06-07 03:43:27 PDT
- 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
Attachments
Patch (7.48 KB, patch)
2013-04-23 06:30 PDT, Allan Sandfeld Jensen
no flags
Patch (6.69 KB, patch)
2013-04-23 06:33 PDT, Allan Sandfeld Jensen
no flags
Zoltan Herczeg
Comment 1 2012-06-08 06:15:55 PDT
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
Alexey Proskuryakov
Comment 2 2012-06-08 11:05:12 PDT
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.
Allan Sandfeld Jensen
Comment 3 2013-04-22 07:21:51 PDT
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.
Allan Sandfeld Jensen
Comment 4 2013-04-22 11:38:29 PDT
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.
Allan Sandfeld Jensen
Comment 6 2013-04-23 06:26:56 PDT
*** Bug 43568 has been marked as a duplicate of this bug. ***
Allan Sandfeld Jensen
Comment 7 2013-04-23 06:30:46 PDT
Allan Sandfeld Jensen
Comment 8 2013-04-23 06:33:00 PDT
Created attachment 199228 [details] Patch uploaded unrelated changed
Jocelyn Turcotte
Comment 9 2013-05-16 05:20:20 PDT
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.
Geoffrey Garen
Comment 10 2013-05-16 09:57:14 PDT
Looks OK to me.
WebKit Commit Bot
Comment 11 2013-05-17 05:29:34 PDT
Comment on attachment 199228 [details] Patch Clearing flags on attachment: 199228 Committed r150250: <http://trac.webkit.org/changeset/150250>
WebKit Commit Bot
Comment 12 2013-05-17 05:29:38 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.