<?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>3610</bug_id>
          
          <creation_ts>2006-08-21 12:59:50 +0000</creation_ts>
          <short_desc>Test fn-avgflt2args-1 answers are incorrect</short_desc>
          <delta_ts>2006-08-31 14:01:44 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Query Test Suite</product>
          <component>XML Query Test Suite</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</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="John Snelson">jsnelson</reporter>
          <assigned_to name="Carmelo Montanez">carmelo</assigned_to>
          
          
          <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>11218</commentid>
    <comment_count>0</comment_count>
    <who name="John Snelson">jsnelson</who>
    <bug_when>2006-08-21 12:59:50 +0000</bug_when>
    <thetext>The test is:

fn:avg((xs:float(&quot;-3.4028235E38&quot;),xs:float(&quot;-3.4028235E38&quot;)))

the test result required is:

-INF

but I think that &quot;-3.4028235E38&quot; should also be allowed as a valid answer. This would allow an XQuery implementation to use an average function with greater precision, and seems to fall within the limits of the spec. This new result is still within the limits imposed on xs:float datatypes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11225</commentid>
    <comment_count>1</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2006-08-22 17:17:59 +0000</bug_when>
    <thetext>While it might be desirable to be able to use greater precision in the calaculation of fn:avg, I believe that the F&amp;O specification does not allow us this flexibility. 

Section 15.4.2, fn:avg, of F&amp;O says in part:

&quot;Otherwise, returns the average of the values computed as sum($arg) div count($arg).&quot;

Section 15.4.5, fn:sum, requires that a sum of xs:float values returns xs:float, saying in part:

&quot;For numeric values, the numeric promotion rules defined in 6.2 Operators on Numeric Values are used to promote all values to a single common type. The sum of a sequence of integers will therefore be an integer, while the sum of a numeric sequence that includes at least one xs:double will be an xs:double.&quot;


I believe that your comment is a comment on F&amp;O more than it is on the test suite itself. I encourage you to submit it on this spec (instructions in the front matter of F&amp;O). The XML Query and XSL WGs are meeting this week and will consider any comments that you submit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11227</commentid>
    <comment_count>2</comment_count>
    <who name="John Snelson">jsnelson</who>
    <bug_when>2006-08-22 17:43:53 +0000</bug_when>
    <thetext>Thanks. I&apos;ve made a comment against the F&amp;O spec in bug #3615.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11299</commentid>
    <comment_count>3</comment_count>
    <who name="John Snelson">jsnelson</who>
    <bug_when>2006-08-28 10:04:50 +0000</bug_when>
    <thetext>The working group has voted to accept changes along the lines of those I have requested. I believe that means that this now qualifies as an actual bug in the test suite.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11324</commentid>
    <comment_count>4</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-08-30 14:31:17 +0000</bug_when>
    <thetext>All:

Pending resoltion from the Working Group, I will leave this bug open for the time being.

Thanks,
Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11339</commentid>
    <comment_count>5</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-08-31 14:01:44 +0000</bug_when>
    <thetext>John:

Thanks for the comment.  I added the extra possible expected value as allowed by the Working Group decision.

Thanks,
Carmelo</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>