Documentation of 'edu.jas.arith.Roots' Java class
Roots
edu.jas.arith

Class Roots



  • public class Roots
    extends java.lang.Object
    Root computation algorithms. Roots for BigInteger and BigDecimals.
    • Constructor Detail

      • Roots

        public Roots()
    • Method Detail

      • root

        public static BigInteger root(BigInteger A,
                                      int n)
        Integer n-th root. Uses BigDecimal and newton iteration. R is the n-th root of A.
        Parameters:
        A - big integer.
        n - long.
        Returns:
        the n-th root of A.
      • sqrt

        public static BigInteger sqrt(BigInteger A)
        Integer square root. Uses BigDecimal and newton iteration. R is the square root of A.
        Parameters:
        A - big integer.
        Returns:
        the square root of A.
      • sqrtInt

        public static BigInteger sqrtInt(BigInteger A)
        Integer square root. Uses BigInteger only. R is the square root of A.
        Parameters:
        A - big integer.
        Returns:
        the square root of A.
      • sqrt

        public static BigDecimal sqrt(BigDecimal A)
        Square root. R is the square root of A.
        Parameters:
        A - big decimal.
        Returns:
        the square root of A.
      • root

        public static BigDecimal root(BigDecimal A,
                                      int n)
        N-th root. R is the n-th root of A.
        Parameters:
        A - big decimal.
        n - long.
        Returns:
        the n-th root of A.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.