BigInteger.sqrt

Returns the integer square root of this BigInteger. The integer square root of the corresponding mathematical integer {@code n} is the largest mathematical integer {@code s} such that {@code s*s <= n}. It is equal to the value of {@code floor(sqrt(n))}, where {@code sqrt(n)} denotes the real square root of {@code n} treated as a real. Note that the integer square root will be less than the real square root if the latter is not representable as an integral value.

@return the integer square root of {@code this} @throws ArithmeticException if {@code this} is negative. (The square root of a negative integer {@code val} is {@code (i * sqrt(-val))} where <i>i</i> is the <i>imaginary unit</i> and is equal to {@code sqrt(-1)}.)

class BigInteger
sqrt
()

Meta