<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - dEQP-GLES3: tanh produces incorrect results for some limit cases"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=89640">89640</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>dEQP-GLES3: tanh produces incorrect results for some limit cases
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Drivers/DRI/i965
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>idr@freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>itoral@igalia.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>List of affected tests:

dEQP-GLES3.functional.shaders.builtin_functions.precision.tanh.highp_vertex.scalar
dEQP-GLES3.functional.shaders.builtin_functions.precision.tanh.highp_vertex.vec2
dEQP-GLES3.functional.shaders.builtin_functions.precision.tanh.highp_vertex.vec3
dEQP-GLES3.functional.shaders.builtin_functions.precision.tanh.highp_vertex.vec4
dEQP-GLES3.functional.shaders.builtin_functions.precision.tanh.highp_fragment.scalar
dEQP-GLES3.functional.shaders.builtin_functions.precision.tanh.highp_fragment.vec2
dEQP-GLES3.functional.shaders.builtin_functions.precision.tanh.highp_fragment.vec3
dEQP-GLES3.functional.shaders.builtin_functions.precision.tanh.highp_fragment.vec4

tanh is implemented as:

   body.emit(ret(div(sub(exp(x), exp(neg(x))),
                     add(exp(x), exp(neg(x))))));

For some values of x this leads to a infinity values in the denominator and
numerator. The division of such values leads to a NaN instead of 1.0 (the
result expected by dEQP and the result of tanh from libc too).

I suppose we can add as-hoc code to handle these cases and produce a result of
1.0 directly in software when we detect them, but I wonder if it is worth the
cost.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>