Skip to content

Commit 8f93c8d

Browse files
committed
[bugfix] Increase decimal precision from 64 bits to 128 bits in fn:format-number
1 parent 0408cc2 commit 8f93c8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exist-core/src/main/java/org/exist/xquery/functions/fn/FnFormatNumbers.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ private String format(final NumericValue number, final DecimalFormat decimalForm
647647
}
648648
}
649649

650-
adjustedNumber = new DecimalValue(this, adjustedNumber.convertTo(Type.DECIMAL).toJavaObject(BigDecimal.class).multiply(BigDecimal.ONE, MathContext.DECIMAL64)).round(new IntegerValue(this, subPicture.getMaximumFractionalPartSize())).abs();
650+
adjustedNumber = new DecimalValue(this, adjustedNumber.convertTo(Type.DECIMAL).toJavaObject(BigDecimal.class).multiply(BigDecimal.ONE, MathContext.DECIMAL128)).round(new IntegerValue(this, subPicture.getMaximumFractionalPartSize())).abs();
651651

652652
/* we can now start formatting for display */
653653

0 commit comments

Comments
 (0)