Ask Experts Questions for FREE Help!
 

Free Answers in 3 Easy Steps

Register Now
3 Steps
 


Ask QuestionsprogressAnswer QuestionsprogressBuild ReputationprogressBecome an Expert
 
At Ask Me Help Desk you can ask questions in any topic and have them answered for free by our experts. To ask questions or participate in answering them you must register for a free account. By registering you will be able to:
  • Get free answers from experts in any of our 300+ topics.
  • Accept money for answers that you provide.
  • Communicate privately with other members (PM).
  • See fewer ads.
  View Answers    Answer this question    Ask a question  
 

Blacksage
Nov 30, 2007, 11:47 AM
There seems to be know Sqrt method in the BigDecimal Class. They Do have a power method but the power method only takes ints. So I can't try and do something to the .5 or 1/2 power. Dose anyone know of any other way I can find sqrt using Java BigDecimal? Thanks

jstrike
Dec 4, 2007, 07:40 AM
Try:
BigDecimal bd = new BigDecimal(343325027336.33);
Math.sqrt(bd.doubleValue());

Blacksage
Dec 4, 2007, 01:17 PM
Wouldn't that be the same thing as:
Double x = Math.sqrt(343325027336.33);

jstrike
Dec 14, 2007, 07:12 AM
Wouldnt that be the same thing as:
Double x = Math.sqrt(343325027336.33);
Yes, but he said he's using the BigDecimal class so you need to go from BigDecimal to double. There may be other BigDecimal methods that he's using prior to needing the square root.