Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Finding the square root without the sqrt command
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
basketball4ever




PostPosted: Wed Apr 13, 2005 8:33 pm   Post subject: Finding the square root without the sqrt command

is there a way???
Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Wed Apr 13, 2005 8:44 pm   Post subject: (No subject)

Yes.
code:

put 4**(1/2)
Martin




PostPosted: Wed Apr 13, 2005 8:48 pm   Post subject: (No subject)

Or, if you want to have a slightly more interesting answer, you could use a binomial expansion.

http://mathworld.wolfram.com/BinomialSeries.html
Delos




PostPosted: Wed Apr 13, 2005 9:00 pm   Post subject: (No subject)

[cough]

I posted up a method using Newton's Method a while back. Don't know if it's still around. As a note though, bugz gave me some strange but normal looking numbers that killed it :S. It still worked though!
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: