Class BigDecimalUtils

java.lang.Object
io.deephaven.util.BigDecimalUtils

public class BigDecimalUtils extends Object
Computes the square root of a BigDecimal using Babylonian method.
  • Constructor Details

    • BigDecimalUtils

      public BigDecimalUtils()
  • Method Details

    • sqrt

      public static BigDecimal sqrt(BigDecimal x, int scale)
      Uses Babylonian method to determine the square root of a BigDecimal
      Parameters:
      x - the number to find the square root of
      scale - the desired scale for division and epsilon
      Returns:
      the square root of x