public BigDecimal bigDecimalValue ( ) { if ( isNaN ( ) ) { throw new ArithmeticException ( "NaN can not be converted to a BigDecimal" ) ; } if ( isInfinite ( ) ) { throw new ArithmeticException ( "Infinity can not be converted to a BigDecimal" ) ; } BigDecimal bigDecimal = bigDecimalValueNoNegativeZeroCheck ( ) ; // If the BigDecimal is 0, but the Decimal128 is negative, that means we have -0. if ( isNegative ( ) && bigDecimal . signum ( ) == 0 ) { throw new ArithmeticException ( "Negative zero can not be converted to a BigDecimal" ) ; } return bigDecimal ; }
Gets a BigDecimal that is equivalent to this Decimal128 .