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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>29883</bug_id>
          
          <creation_ts>2016-09-29 15:11:48 +0000</creation_ts>
          <short_desc>[Qt3Ts] fo-test-d3e4625, fo-test-d3e4630</short_desc>
          <delta_ts>2016-10-25 14:05:08 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XQuery 3 &amp; XPath 3 Test Suite</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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>1</everconfirmed>
          <reporter name="Tim Mills">tim</reporter>
          <assigned_to name="O&apos;Neil Delpratt">oneil</assigned_to>
          <cc>mike</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>127603</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-09-29 15:11:48 +0000</bug_when>
    <thetext>Using .NET, I get math:tan(math:pi() div 2) to be

16331778728383844.0

and abs($result - 1.633123935319537E16)

to be

539375188474.0.

Are these tests correct?


   &lt;test-case name=&quot;fo-test-d3e4625&quot;&gt;
      &lt;description&gt;Test case for math:tan&lt;/description&gt;
      &lt;created by=&quot;generate-qt3-test-set.xsl&quot; on=&quot;2016-09-26&quot;/&gt;
      &lt;environment ref=&quot;global&quot;/&gt;
      &lt;test&gt;
        math:tan(math:pi() div 2)
      &lt;/test&gt;
      &lt;result&gt;
         &lt;assert&gt;abs($result - 1.633123935319537E16) lt 1e-5&lt;/assert&gt;
      &lt;/result&gt;
   &lt;/test-case&gt;

   &lt;test-case name=&quot;fo-test-d3e4630&quot;&gt;
      &lt;description&gt;Test case for math:tan&lt;/description&gt;
      &lt;created by=&quot;generate-qt3-test-set.xsl&quot; on=&quot;2016-09-26&quot;/&gt;
      &lt;environment ref=&quot;global&quot;/&gt;
      &lt;test&gt;
        math:tan(-math:pi() div 2)
      &lt;/test&gt;
      &lt;result&gt;
         &lt;assert&gt;abs($result - -1.633123935319537E16) lt 1e-5&lt;/assert&gt;
      &lt;/result&gt;
   &lt;/test-case&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127952</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-10-25 14:05:08 +0000</bug_when>
    <thetext>The problem is that the &quot;approximately&quot; flag in the markup generates a test for small differences, whereas here the difference between the actual result and the true mathematical result (infinity) is huge.

I propose to change the text in the spec to:

1 div math:tan(math:pi() div 2) returns 0.0e0 (approximately). Mathematically, tan(π/2) is positive infinity. But because math:pi() div 2 returns an approximation, the result of math:tan(math:pi() div 2) will be a large but finite number.

and similarly for the negative case.

The test that is generated will then test that abs(1 div math:tan(math:pi() div 2)) - 0.0e0 is less than some epsilon.

I have changed the stylesheet that generates the tests to produce stable names, which are needed for the QT3 results reporting process (as this compares reported test results against the current test catalog).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>