Class NumberUtil
java.lang.Object
org.pentaho.reporting.libraries.formula.util.NumberUtil
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic BigDecimal
divide
(BigDecimal bd1, BigDecimal bd2) static BigDecimal
getAsBigDecimal
(Number number) static BigDecimal
Performs a rounding to get a more reliable (int) cast.static BigDecimal
static BigDecimal
-
Field Details
-
DELTA
-
INT_TEST_DELTA
-
-
Method Details
-
getAsBigDecimal
-
performIntRounding
Performs a rounding to get a more reliable (int) cast. This makes sure that nearly exact values like 0.9999999..9999 are correctly interpreted as 1 while exact values like 0.99 are interpreted as 0.- Parameters:
n
-- Returns:
-
performTuneRounding
-
removeTrailingZeros
-
divide
- Throws:
EvaluationException
-