-
Enhancement
-
Resolution: Fixed
-
P4
-
9
-
b97
-
Verified
Two possible square root methods are proposed:
1) Square Root
public BigInteger sqrt() {}
Returns a BigInteger whose value is (floor(sqrt(this))), where sqrt(.) denotes the mathematical square root of the mathematical value of this.
2) Square Root with Remainder
Returns an array of two BigIntegers containing (s = floor(sqrt(this))) followed by (this - s^2), where sqrt(.) denotes the mathematical square root of the mathematical value of this.
public BigInteger[] sqrtAndRemainder() {}
A third method such as "BigInteger sqrtRemainder()" is also feasible but would simply be equal to sqrtAndRemainder()[1].
1) Square Root
public BigInteger sqrt() {}
Returns a BigInteger whose value is (floor(sqrt(this))), where sqrt(.) denotes the mathematical square root of the mathematical value of this.
2) Square Root with Remainder
Returns an array of two BigIntegers containing (s = floor(sqrt(this))) followed by (this - s^2), where sqrt(.) denotes the mathematical square root of the mathematical value of this.
public BigInteger[] sqrtAndRemainder() {}
A third method such as "BigInteger sqrtRemainder()" is also feasible but would simply be equal to sqrtAndRemainder()[1].
- duplicates
-
JDK-8077587 BigInteger Roots
-
- Closed
-
- relates to
-
JDK-8341402 BigDecimal's square root optimization
-
- In Progress
-
-
JDK-4851777 Add BigDecimal sqrt method
-
- Closed
-
-
JDK-8014319 Faster division of large integers
-
- Closed
-