Class Exp


  • public class Exp
    extends Object
    Implementation of the exponential function for big decimals.
    Author:
    Tilman Neumann
    • Constructor Detail

      • Exp

        public Exp()
    • Method Detail

      • exp

        public static BigDecimal exp​(BigDecimal w,
                                     Scale outScale)
        Compute exp(w) using a more powerful argument reduction. This function uses the transform exp(w)=exp(x)^(2^K) with x=w*2^(-K). This way, we can bring the argument to develop in a power series arbitrarily near to 0 with very high convergence speed.
        Parameters:
        w - argument
        outScale - wanted precision in after-floating point decimal digits
        Returns:
        exp(w)
      • main

        public static void main​(String[] argv)
        Test.
        Parameters:
        argv - ignored