Package: org.codehaus.groovy.runtime.typehandling

## [Java] Class BigDecimalMath

- org.codehaus.groovy.runtime.typehandling.BigDecimalMath

-     public final class BigDecimalMath
      extends NumberMath

  Arbitrary-precision decimal arithmetic operations.

  Singleton instance providing NumberMath implementations for BigDecimal-based operations. Supports exact decimal arithmetic with configurable precision and rounding. This is the default math provider for non-floating-point division operations.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static int` | `DIVISION_EXTRA_PRECISION` | Extra precision added during division when a non-terminating result would otherwise occur.
    `static int` | `DIVISION_MIN_SCALE` | Minimum scale (decimal places) for division results.
    `static BigDecimalMath` | `INSTANCE` | Singleton instance of BigDecimalMath.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public Number` | `absImpl(Number number)`
    `` | `public Number` | `addImpl(Number left, Number right)`
    `` | `public int` | `compareToImpl(Number left, Number right)`
    `` | `public Number` | `divideImpl(Number left, Number right)`
    `` | `public Number` | `modImpl(Number self, Number divisor)`
    `` | `public Number` | `multiplyImpl(Number left, Number right)`
    `` | `public Number` | `remainderImpl(Number left, Number right)`
    `` | `public Number` | `subtractImpl(Number left, Number right)`
    `` | `public Number` | `unaryMinusImpl(Number left)`
    `` | `public Number` | `unaryPlusImpl(Number left)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class NumberMath` | `abs, absImpl, add, addImpl, and, andImpl, bitwiseNegate, bitwiseNegateImpl, compareTo, compareToImpl, createUnsupportedException, divide, divideImpl, getMath, intdiv, intdivImpl, isBigDecimal, isBigInteger, isByte, isFloatingPoint, isInteger, isLong, isShort, leftShift, leftShiftImpl, mod, modImpl, multiply, multiplyImpl, or, orImpl, remainder, remainderImpl, rightShift, rightShiftImpl, rightShiftUnsigned, rightShiftUnsignedImpl, subtract, subtractImpl, toBigDecimal, toBigInteger, unaryMinus, unaryMinusImpl, unaryPlus, unaryPlusImpl, xor, xorImpl`

- - ### Field Detail

    - #### public static final int DIVISION_EXTRA_PRECISION

      Extra precision added during division when a non-terminating result would otherwise occur.

      Configurable via system property "groovy.division.extra.precision", defaults to 10.

    - #### public static final int DIVISION_MIN_SCALE

      Minimum scale (decimal places) for division results.

      Configurable via system property "groovy.division.min.scale", defaults to 10.

    - #### public static final BigDecimalMath INSTANCE

      Singleton instance of BigDecimalMath.

  - ### Method Detail

    - #### public Number absImpl(Number number)

    - #### public Number addImpl(Number left, Number right)

    - #### public int compareToImpl(Number left, Number right)

    - #### public Number divideImpl(Number left, Number right)

    - #### public Number modImpl(Number self, Number divisor)

    - #### public Number multiplyImpl(Number left, Number right)

    - #### public Number remainderImpl(Number left, Number right)

    - #### public Number subtractImpl(Number left, Number right)

    - #### public Number unaryMinusImpl(Number left)

    - #### public Number unaryPlusImpl(Number left)