BigDecimal x = null, e = null; // initial x: x0 ~ sqrt()
BigDecimal v = null, g = null; // initial v: v0 = 1/(2*x)
// Estimate the square root with the foremost 62 bits of squarD
BigInteger bi = squarD.unscaledValue(); // bi and scale are a tandem
int biLen = bi.bitLength();
int shift = Math.max(0, biLen - BITS + (biLen%2 == 0 ? 0 : 1)); // even shift..
bi = bi.shiftRight(shift); // ..floors to 62 or 63 bit BigInteger
double root = Math.sqrt(bi.doubleValue());
BigDecimal halfBack = new BigDecimal(BigInteger.ONE.shiftLeft(shift/2));