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 2351 - op-divide-yearMonthDuration-by-yMD-11: results are impl-def
Summary: op-divide-yearMonthDuration-by-yMD-11: results are impl-def
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 0.7.0
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Carmelo Montanez
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-18 10:56 UTC by Michael Kay
Modified: 2005-10-29 09:28 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2005-10-18 10:56:35 UTC
The results of op-divide-yearMonthDuration-by-yMD-11 are sensitive to the
precision of decimal division, which is implementation-defined. The results are
given as

1.859410358565737

but the answer

1.8594103585657370518

is equally legitimate

I suggest changing the query to

round-to-half-even(
  (xdt:yearMonthDuration("P42Y10M") div xdt:yearMonthDuration("P20Y10M"))
    div 
  (xdt:yearMonthDuration("P20Y11M") div xdt:yearMonthDuration("P18Y11M")),
15)
Comment 1 Carmelo Montanez 2005-10-24 17:57:32 UTC
Agree:

Changed test accordingly.  Submitted test and results.
I think you meant "round-half-to-even".  Please close
bug if you agree with resolution.

Carmelo