Project

Profile

Help

Support #6408

closed

decimalDivide uses HALF_DOWN instead of HALF_UP rounding

Added by Svante Schubert 7 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
XPath conformance
Sprint/Milestone:
-
Start date:
2024-04-29
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
12
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
Java

Description

In class net.sf.saxon.expr.Calculator.java

The function public static BigDecimalValue decimalDivide(NumericValue a, NumericValue b) throws XPathException

is using HALF_DOWN instead of HALF_UP rounding, which would be the default of XPath 3.1 round() see https://www.w3.org/TR/xpath-functions-31/#numeric-value-functions

Seen in 12.4 release


Files

rounding-messages.xsl (5.53 KB) rounding-messages.xsl stand-alone rounding test messages (free to be used as any license you like to) Svante Schubert, 2024-05-02 10:26

Please register to edit this issue

Also available in: Atom PDF