Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ static double round(double value, int scale) {
}

static @NonNull BigDecimal round(@NonNull BigDecimal value, int scale) {
if (-10 <= scale && scale <= 10) {
if (-30 <= scale && scale <= 30) {
BigDecimal result = value.setScale(scale, RoundingMode.HALF_UP);
if (scale < 0) {
result = result.setScale(0, RoundingMode.HALF_UP);
}
return result;
}
throw new ExprEvaluatingException(
new ArithmeticException("Scale of " + NAME + " function must be in range [-10, 10].")
new ArithmeticException("Scale of " + NAME + " function must be in range [-30, 30].")
);
}

Expand Down