Current location: Hot Scripts Forums » Programming Languages » Everything Java » Need help Please


Need help Please

Reply
  #1 (permalink)  
Old 04-23-08, 02:45 AM
Joomla Joomla is offline
New Member
 
Join Date: Apr 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
X_X Need help Please

How to implement the square root function using binary search without using <math.sqrt() OR any other Math Function except abs ().

In addition this code should use Binary Search NOT Newton's Method

The answer has to be accurate at least 4 decimal places.

Thank you in advance!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 04-29-08, 05:58 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
This sounds like a homework assignment to me

Anyway: I don't think there's any easy way to create a square root function similar to the Math.square or Math.pow method. Basically I think this is completely stupid as the Math.square function allready does the job.

What exactly do you mean with "implement the square root function using binary search"?

Can you post what you have thus far?
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 06:54 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.