Square root of BigDecimal in Java
Can we compute the square root of a BigDecimal in Java by using only the Java API and not a custom-made 100-line algorithm? I've used this and it works quite well. Here's an example of how the algorithm works at a high level. Edit: I was curious to see just how accurate this was as defined below. Here is the sqrt(2) from an official source : (first 200 digits) 1.41421356237309504880168872420969807856967187537694807317667973799073247846210703885038753432764157273501384623091229702492483605585073721264412149709993583141322266592750559275579995050115278206057147 and here it is using the approach