Package: java.math

## Class BigInteger

- - ### Methods Summary

    Methods
    Return type | Name and parameters
    --- | ---
    `void` | `downto(Number to, Closure closure)` Iterates from this number down to the given number, inclusive, decrementing by one each time.
    `Number` | `power(Integer exponent)` Power of a BigInteger to an integer certain exponent.
    `BigInteger` | `power(BigInteger exponent)` Power of a BigInteger to a BigInteger certain exponent.
    `void` | `upto(Number to, Closure closure)` Iterates from this number up to the given number, inclusive, incrementing by one each time.

  - #### Methods inherited from class java.lang.Number

    `abs`, `and`, `asBoolean`, `asType`, `bitwiseNegate`, `compareTo`, `compareTo`, `div`, `div`, `downto`, `intdiv`, `intdiv`, `isCase`, `isNotCase`, `leftShift`, `minus`, `minus`, `mod`, `multiply`, `multiply`, `next`, `or`, `plus`, `plus`, `plus`, `power`, `previous`, `rightShift`, `rightShiftUnsigned`, `step`, `times`, `toBigDecimal`, `toBigInteger`, `toDouble`, `toFloat`, `toInteger`, `toLong`, `unaryMinus`, `unaryPlus`, `upto`, `xor`

  - #### Methods inherited from class java.lang.Object

    `addShutdownHook`, `any`, `any`, `asBoolean`, `asType`, `collect`, `collect`, `collect`, `dump`, `each`, `eachMatch`, `eachMatch`, `eachWithIndex`, `every`, `every`, `find`, `find`, `findAll`, `findAll`, `findIndexOf`, `findIndexOf`, `findIndexValues`, `findIndexValues`, `findLastIndexOf`, `findLastIndexOf`, `findResult`, `findResult`, `getAt`, `getMetaClass`, `getMetaPropertyValues`, `getProperties`, `grep`, `grep`, `hasProperty`, `identity`, `inject`, `inject`, `inspect`, `invokeMethod`, `is`, `isCase`, `isNotCase`, `iterator`, `metaClass`, `print`, `print`, `printf`, `printf`, `println`, `println`, `println`, `putAt`, `respondsTo`, `respondsTo`, `setMetaClass`, `split`, `sprintf`, `sprintf`, `stream`, `tap`, `toString`, `use`, `use`, `use`, `with`, `with`, `withCloseable`, `withStream`, `withTraits`

  - #### Methods inherited from interface java.lang.Comparable

    `numberAwareCompareTo`

- - ### Methods Detail

    - #### public void downto(Number to, Closure closure)

      Iterates from this number down to the given number, inclusive, decrementing by one each time.

      Parameters:
        `to` - the end number
        `closure` - the code to execute for each number
      Since:
        1.0

    - #### public Number power(Integer exponent)

      Power of a BigInteger to an integer certain exponent. If the exponent is positive, call the BigInteger.pow(int) method to maintain precision. Called by the '**' operator.

      Parameters:
        `exponent` - an Integer exponent
      Returns:
        a Number to the power of a the exponent

    - #### public BigInteger power(BigInteger exponent)

      Power of a BigInteger to a BigInteger certain exponent. Called by the '**' operator.

      Parameters:
        `exponent` - a BigInteger exponent
      Returns:
        a BigInteger to the power of a the exponent
      Since:
        2.3.8

    - #### public void upto(Number to, Closure closure)

      Iterates from this number up to the given number, inclusive, incrementing by one each time. Example:

          0.upto( 10 ) {
            println it
          }

      Prints numbers 0 to 10
      Parameters:
        `to` - the end number
        `closure` - the code to execute for each number
      Since:
        1.0