3d-morph.js fails on QNX. The testOutput is expected to be a number that starts with a 6, but the actual output is approx. -4.97e-14. I reimplemented 3d-morph in C, and I executed it both with double and long double on x86_64 Linux. By using double calculations and sin(), the result was 6.75e-14. By using long double calculations and sinl(), the result was -6.279e-14. Is the theoretical result supposed to be zero, and the actual one closed to zero, due to error accumulations? Running the same program on ARM QNX, the result (using double and sin()) was -4.97e-14, i.e. same as inside JSC. Then I looked at all intermediate results returned by sin(). Out of 240 distinct calls to sin(), about ~65 of them are different by exactly 1ULP. In my understanding, that error should be acceptable.
Created attachment 200429 [details] Patch
Comment on attachment 200429 [details] Patch We should test this on other platforms as well. Note that sin() is not defined to have *any* precision guarantee in ECMAScript. So even if our engine can achieve this level of erro it might not be fair to require others to.
Comment on attachment 200429 [details] Patch Oh. Sorry. You're making the test even more lax. I'll have to think about it.
Comment on attachment 200429 [details] Patch Removing r? and cq? flags. I resubmitted this patch accidentally in bug 115580, and it landed over there.
*** This bug has been marked as a duplicate of bug 115580 ***
At the WebKit meeting, Filip Pizlo required additional data to back my precision claims regarding 1ULP roundoff errors. I will provide the test program and the intermediate output values, for comparison, in the other bug.