Quant Tech
Sunday, 31 March 2013
Finding Square Root in Scala
After completing the
Algorithms I
course by Robert Sedgewick, I am now taking the
Functional Programming Principles in Scala
by Martin Odersky.
The following is a Scala snippet for finding the square root:
A graphical representation of Newton's method for finding the nth root.
The higher order terms O(h^2) have been dropped in the f(x+h) approximation, since it is a linear approximation.
The updating rule x_(n+1):
Happy Easter! :)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment