This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
We have problems running the following tests because of rounding errors. E.g. the tests generally pass in our implementation and return a correct result, but the string comparison fails because of rounding. This is because the precision an xs:decimal must provide is generally implementation defined (though required to be at least 18). See http://www.w3.org/TR/xmlschema-2/#decimal. InternalVariablesWithout VarDecl020 Expects an xs:decimal to support 27 digits after the colon. The following tests fail because they expect less precision than we provide. It seems they expect 17 digits of precision, so it's actually impossible to meet both tests. NumericDivide op-numeric-divideint2args-2 NumericDivide op-numeric-divideint2args-3 NumericDivide op-numeric-divideint2args-4 NumericDivide op-numeric-divideint2args-5 NumericDivide op-numeric-divideintg2args-2 NumericDivide op-numeric-divideintg2args-4 NumericDivide op-numeric-dividedec2args-2 NumericDivide op-numeric-dividedec2args-4 NumericDivide op-numeric-dividelng2args-2 NumericDivide op-numeric-dividelng2args-4 NumericDivide op-numeric-dividenint2args-2 NumericDivide op-numeric-dividenint2args-4 NumericDivide op-numeric-dividepint2args-4 NumericDivide op-numeric-dividenpi2args-2 NumericDivide op-numeric-dividenpi2args-4 NumericDivide op-numeric-dividesht2args-4 NumericDivide op-numeric-dividesht2args-5 Please note that these tests do not produce doubles or floats, which have a defined precision. It would probably be best to do a round-to-half-even($num, 18) on all of these values before comparing the results.
Same goes for: op-divide-dayTimeDuration-by-dTD-1 op-divide-dayTimeDuration-by-dTD-11
Plus: op-divide-yearMonthDuration-by-yMD-11
Tests changed. Added the "round-to-half-even" function to tests and adjust precision to match the type. Please note that precision is not the main point of the test. So long as not asking for precision beyond what is stated in teh specs, the test is ok. Please close the bug if you agree with solution. Thanks, Carmelo Montanez