Class BigDecimalUtils

java.lang.Object
com.illumon.iris.utils.BigDecimalUtils

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

  • 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