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 29678 - [QT3TS] same-key-006
Summary: [QT3TS] same-key-006
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: O'Neil Delpratt
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-01 12:15 UTC by Tim Mills
Modified: 2016-06-17 10:02 UTC (History)
3 users (show)

See Also:


Attachments

Description Tim Mills 2016-06-01 12:15:16 UTC
According to XQ31, the xs:decimal type minimum value for the maximum number of decimal digits (totalDigits facet) is 18.

The test same-key-006 requires greater precision than is required by the specification.

xs:decimal("1.00000000000000000000000000000000001")
Comment 1 Josh Spiegel 2016-06-01 13:06:17 UTC
Would you like an alternate result?  FOCA0001?
Comment 2 Tim Mills 2016-06-01 13:53:07 UTC
(In reply to Josh Spiegel from comment #1)
> Would you like an alternate result?  FOCA0001?

Either that, or reduce the decimals to use the minimum 18 digits.

xs:decimal("1.00000000000000001")
xs:decimal("1.00000000000000002")


I have to say, I'm struggling with a few of these tests as there is no built-in arbitrary (or sufficiently high) precision decimal in .NET to which I can convert a double, float or integer/decimal.
Comment 3 Josh Spiegel 2016-06-01 14:07:09 UTC
I guess that would work too since they still map to the same double.

> I have to say, I'm struggling with a few of these tests as there is no built-in arbitrary (or sufficiently high) precision decimal 

Mike suggested at some point that implementations like yours could fake it by using strings.  It sounds plausible to me but I haven't fully thought it through.
Comment 4 Michael Kay 2016-06-02 07:52:41 UTC
We're off-topic here, but some people recommend using the J# library.

We're having to use a 3rd party library for xs:decimal in our Javascript product, it's not the end of the world...
Comment 5 Tim Mills 2016-06-02 08:31:10 UTC
(In reply to Michael Kay from comment #4)
> We're off-topic here, but some people recommend using the J# library.
> 
> We're having to use a 3rd party library for xs:decimal in our Javascript
> product, it's not the end of the world...

I'm going to ask for this to be put on the agenda for next week.  I'll post to the mailing list my thoughts on the subject.
Comment 6 Andrew Coleman 2016-06-17 10:02:11 UTC
At the meeting on 2016-06-14, the WG agreed to adopt the solution in comment #2.
Action A-646-04 will track this.