Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to calculate square root a number?

807600Jun 19 2007 — edited Mar 22 2008
Hi Folks!

Can anybody tell me is there any class which i can use to take square root of a number? I check BigDecimal & BigInteger but didnt see any method for square root. I need to calculate square root in my following code.
public void calcSqrt(BigInteger in)
 {
  BigDecimal div, adding, divTwo;
  BigInteger input = in;
  //square root of input...
}
Thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 19 2008
Added on Jun 19 2007
8 comments
612 views