Class Pow

java.lang.Object
de.tilman_neumann.jml.powers.Pow

public class Pow
extends java.lang.Object
  • Constructor Summary

    Constructors
    Constructor Description
    Pow()  
  • Method Summary

    Modifier and Type Method Description
    static java.math.BigDecimal pow​(java.math.BigDecimal x, int n, Scale resultScale)  
    static java.math.BigDecimal pow​(java.math.BigDecimal x, java.math.BigInteger n, Precision prec)
    Power function for large integer exponents (also negative)
    static java.math.BigDecimal powJavaTrunc​(java.math.BigDecimal x, int n, Precision resultPrecision)  

    Methods inherited from class java.lang.Object

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

    • Pow

      public Pow()
  • Method Details

    • pow

      public static java.math.BigDecimal pow​(java.math.BigDecimal x, java.math.BigInteger n, Precision prec)
      Power function for large integer exponents (also negative)
      Parameters:
      x - Basis
      n - Exponent
      prec - output precision in leading decimal digits
      Returns:
      x^n
    • pow

      public static java.math.BigDecimal pow​(java.math.BigDecimal x, int n, Scale resultScale)
    • powJavaTrunc

      public static java.math.BigDecimal powJavaTrunc​(java.math.BigDecimal x, int n, Precision resultPrecision)