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 2936 - negative zero xs:float in expected results?
Summary: negative zero xs:float in expected results?
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 0.8.6
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Carmelo Montanez
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-24 22:28 UTC by Marc Van Cappellen
Modified: 2006-05-17 22:12 UTC (History)
0 users

See Also:


Attachments

Description Marc Van Cappellen 2006-02-24 22:28:34 UTC
In http://www.w3.org/TR/xquery-operators/#constructor-functions-for-xsd-types 
we read:

xs:float($arg as xdt:anyAtomicType?) as xs:float?
Implementations ·may· return negative zero for xs:float("-0.0E0"). [XML Schema 
Part 2: Datatypes Second Edition] does not distinguish between the values 
positive zero and negative zero.

The following tests:
  orderBy25.xq
  orderBy27.xq
  orderBy57.xq
The expected result contains "0", shouldn't there be a second expected result 
specifying -0?

FYI, we're running XQTS using an implementation based on the Infoset mapping. 
As such in the above mentioned tests we're constructing xs:float values 
starting from xdt:untypedAtomic values.

Thanks,
Marc
Comment 1 Andrew Eisenberg 2006-02-28 14:42:56 UTC
Yes, there should be a second expected result for Infoset-based implementations
that begins with:

<results xmlns="http://www.w3.org/XQueryTestOrderBy">-0 ...

Actually, we should have one result for PSVI-based implementations that starts
with 0, one for Infoset-based implementations that begins with -0, and one for
Infoset-based implementations that begins with 0.
Comment 2 Carmelo Montanez 2006-03-06 19:50:30 UTC
Mark:

Added second possible output for offending tests.  Please close the bug when 
able to verify and if in agreement.

Thanks,
Carmelo
Comment 3 Marc Van Cappellen 2006-05-17 22:12:47 UTC
verified and looks ok