<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>115553</bug_id>
          
          <creation_ts>2013-05-03 09:57:25 -0700</creation_ts>
          <short_desc>SunSpider 1.0: 3d-morph: use epsilon to check result</short_desc>
          <delta_ts>2013-05-04 01:28:22 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>115580</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Cosmin Truta">ctruta</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>fpizlo</cc>
    
    <cc>ggaren</cc>
    
    <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>884189</commentid>
    <comment_count>0</comment_count>
    <who name="Cosmin Truta">ctruta</who>
    <bug_when>2013-05-03 09:57:25 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>884194</commentid>
    <comment_count>1</comment_count>
      <attachid>200429</attachid>
    <who name="Cosmin Truta">ctruta</who>
    <bug_when>2013-05-03 10:03:04 -0700</bug_when>
    <thetext>Created attachment 200429
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>884226</commentid>
    <comment_count>2</comment_count>
      <attachid>200429</attachid>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2013-05-03 10:53:43 -0700</bug_when>
    <thetext>Comment on attachment 200429
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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>884227</commentid>
    <comment_count>3</comment_count>
      <attachid>200429</attachid>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2013-05-03 10:56:04 -0700</bug_when>
    <thetext>Comment on attachment 200429
Patch

Oh. Sorry. You&apos;re making the test even more lax. I&apos;ll have to think about it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>884506</commentid>
    <comment_count>4</comment_count>
      <attachid>200429</attachid>
    <who name="Cosmin Truta">ctruta</who>
    <bug_when>2013-05-04 01:21:26 -0700</bug_when>
    <thetext>Comment on attachment 200429
Patch

Removing r? and cq? flags. I resubmitted this patch accidentally in bug 115580, and it landed over there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>884507</commentid>
    <comment_count>5</comment_count>
    <who name="Cosmin Truta">ctruta</who>
    <bug_when>2013-05-04 01:21:56 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 115580 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>884509</commentid>
    <comment_count>6</comment_count>
    <who name="Cosmin Truta">ctruta</who>
    <bug_when>2013-05-04 01:28:22 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>200429</attachid>
            <date>2013-05-03 10:03:04 -0700</date>
            <delta_ts>2013-05-04 01:21:26 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>patch.diff</filename>
            <type>text/plain</type>
            <size>1721</size>
            <attacher name="Cosmin Truta">ctruta</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1BlcmZvcm1hbmNlVGVzdHMvU3VuU3BpZGVyL0NoYW5nZUxvZyBiL1BlcmZv
cm1hbmNlVGVzdHMvU3VuU3BpZGVyL0NoYW5nZUxvZwppbmRleCBmZWVkMjAzZWE3Li4xODM0ZjY1
MzkyIDEwMDY0NAotLS0gYS9QZXJmb3JtYW5jZVRlc3RzL1N1blNwaWRlci9DaGFuZ2VMb2cKKysr
IGIvUGVyZm9ybWFuY2VUZXN0cy9TdW5TcGlkZXIvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTQgQEAK
KzIwMTMtMDUtMDMgIENvc21pbiBUcnV0YSAgPGN0cnV0YUBibGFja2JlcnJ5LmNvbT4KKworICAg
ICAgICBTdW5TcGlkZXIgMS4wOiAzZC1tb3JwaDogdXNlIGVwc2lsb24gdG8gY2hlY2sgcmVzdWx0
CisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xMTU1NTMK
KworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBTdW5TcGlk
ZXIvM2QtbW9ycGggc2hvdWxkIGJlIG1vcmUgbGVuaWVudCBpbiB2YWxpZGF0aW5nIGl0cyByZXN1
bHRzLCBzaW5jZSB0aGV5I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