Class Multiplication

java.lang.Object
org.jruby.ext.bigdecimal.Multiplication

class Multiplication extends Object
Static library that provides all multiplication of BigInteger methods.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static final BigInteger[]
    An array with the first powers of ten in BigInteger version.
    (package private) static final BigInteger
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Just to denote that this class can't be instantiated.
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static BigInteger
    powerOf10(long exp)
    It calculates a power of ten, which exponent could be out of 32-bit range.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • FIVE

      static final BigInteger FIVE
    • bigTenPows

      static final BigInteger[] bigTenPows
      An array with the first powers of ten in BigInteger version. (10^0,10^1,...,10^31)
  • Constructor Details

    • Multiplication

      private Multiplication()
      Just to denote that this class can't be instantiated.
  • Method Details

    • powerOf10

      static BigInteger powerOf10(long exp)
      It calculates a power of ten, which exponent could be out of 32-bit range. Note that internally this method will be used in the worst case with an exponent equals to: Integer.MAX_VALUE - Integer.MIN_VALUE.
      Parameters:
      exp - the exponent of power of ten, it must be positive.
      Returns:
      a BigInteger with value 10<sup>exp</sup>.