Bug 62629
Summary: | Sputnik math test cases issue | ||
---|---|---|---|
Product: | WebKit | Reporter: | Mahesh Kulkarni <maheshk> |
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Normal | CC: | ahmad.saleem792, ggaren, hausmann, kenneth, kling, laszlo.gombos, oliver, sergey.s, tonikitoo, venkatpenukonda, weizhengshen, zherczeg |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Mahesh Kulkarni
Couple of Sputnik test cases are failing on all browser's
fast/js/sputnik/Conformance/15_Native_Objects/15.8_Math/15.8.2/15.8.2.16_sin/S15.8.2.16_A7.html
fast/js/sputnik/Conformance/15_Native_Objects/15.8_Math/15.8.2/15.8.2.18_tan/S15.8.2.18_A7.html
-------------------------------------------------------------
Because "libc's sin(6.28318530717958620000) != Javascript.Math.sin(6.28318530717958620000)"!!
Tested the above javascript on Chrome, Firefox, Opera and QtTestbrowser all results in,
S15.8.2.16_A7
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
-------------------------------------------------------------
Tested few online calculators (for example http://www.calcoolate.com/) and sin(6.283185307179586) results in same value of JS::Math.sin(). Any thoughts on how to fix this?
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Laszlo Gombos
Based on my testing differences (in libc precision) on different platforms seems to cause this issue. Webkit ports on Windows and Mac seems to pass this test, but not on Linux.
Venkat Penukonda
The two tests:
fast/js/sputnik/Conformance/15_Native_Objects/15.8_Math/15.8.2/15.8.2.16_sin/S15.8.2.16_A7.html
fast/js/sputnik/Conformance/15_Native_Objects/15.8_Math/15.8.2/15.8.2.18_tan/S15.8.2.18_A7.html
pass on Safari on iOS.
Sanders Shen
(In reply to comment #1)
> Based on my testing differences (in libc precision) on different platforms seems to cause this issue. Webkit ports on Windows and Mac seems to pass this test, but not on Linux.
The linux is 32-bit linux os, right?
This issue may be caused by the "sin" function of libc. On 32-bit linux os, "sin(2*PI)" would return "-0.00000000000000024492127076447545", but on 64-bit linux os, it would return "-0.00000000000000024492935982947064".
So, I think these cases would be passed on 64-bit linux os.
sergey.s
Corresponding bug on Ubuntu tracker https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1156579
Ahmad Saleem
These tests are gone - https://github.com/WebKit/WebKit/commit/011fe7359898b678e31fabdc17df1ff69b910764