Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
Exact (LISP-ish) calculations in Ruby?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Gavin Sinclair, post: 4653066"] There's an algorithm for calculating square roots, similar (in appearance, not in process) to the algorithm for long division. One or more generations ago, school students would have done it with pen and paper, I think. Furthermore, there's a Calculus-based algorithm (Newton's method, it's called in my syllabus, but I think it's properly called the Newton- Raphson method) for calculating square/cube/fourth/... roots to any desired accuracy. Thirdly, you can estimate any root you like by trial multiplication! (Exercise: write a Ruby program to do this; shouldn't take more than 10 lines.) [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
Exact (LISP-ish) calculations in Ruby?
Top