This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2709 - Wrong overflow for float sum in sumflt3args-6
Summary: Wrong overflow for float sum in sumflt3args-6
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 0.8.4
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Carmelo Montanez
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-13 04:39 UTC by Jerome Simeon
Modified: 2006-06-22 13:00 UTC (History)
0 users

See Also:


Attachments

Description Jerome Simeon 2006-01-13 04:39:06 UTC
sumflt3args-6

for the sum:
   fn:sum((xs:float("-3.4028235E38"),
           xs:float("-3.4028235E38"),
           xs:float("3.4028235E38")))

  Why wouldn't the result be -3.4028235E38? which is the sum
  of the three floats, and is within the range of floats.

  Note: that the F&O document specifies the semantics through
  recursive function which will sum the last two floats first,
  but I am not sure whether we really impose this on implementations.

- Jerome
Comment 1 Andrew Eisenberg 2006-01-19 16:23:20 UTC
I believe that both -INF and -3.4028235E38 are supported by F&O. The second
paragraph of 15.4.5 fn:sum contains the following:

"The items in the resulting sequence may be reordered in an arbitrary order. The
resulting sequence is referred to below as the converted sequence."

The recursive function that you mention operates on the converted sequence.
Comment 2 Jerome Simeon 2006-01-19 18:24:12 UTC
So I assume both results should be allowed by the test suite. Is that right?
- Jerome
Comment 3 Carmelo Montanez 2006-01-23 16:35:36 UTC
Jerome:

You are correct.  Added extra expected results and submitted them.  Please
close the bug when able to verify.

Thanks,
Carmelo
Comment 4 Jerome Simeon 2006-02-23 18:41:21 UTC
This seems to be still wrong in 0.8.6. The catalog
indicates both -INF and an expected error FOAR0002,
but still not -3.4028235E38 as a possible result.

- Jerome
Comment 5 Carmelo Montanez 2006-03-10 21:47:52 UTC
Jerome:

Sorry, I meant to add the extra file as well.  Generated another expected outcome to include -3.4028235E38.  Please close the bug if in agreement and when able to verify.

Thanks,
Carmelo