Approximating Square Roots w/ Newton's Method

Описание к видео Approximating Square Roots w/ Newton's Method

(Expand description for Errata!) Computing the Square Root of a number is something that turns out to not be straight forward - School teaches us to do it out of memory, without considering the actual algorithm or steps to achieve it.

Today, we look at one algorithm to approximate the square root of a number - Newton's Method! We'll first look at the math behind the technique, before going on to code it in Python!

ERRATA: At 10:30, there is a mistake in the equation shown in the yellow box. The sign in the middle is "-" not "+". Thanks to Gil Shapira for pointing out the error!

= CODE DOWNLOAD =
To view and download the code written in this video, check out the following Bitbucket repository: https://bitbucket.org/nerdfirst/newto...

To download, first click on "Downloads" in the left sidebar. Then, in the subsequent page, click "Download Repository".

= Contents =
00:00 Introduction
01:31 Contents Page
02:11 Explanation of the Math
→ 02:20 Forming the main function f(x)
→ 03:00 How to use the function representation
→ 03:23 Overview of what Newton's Method does
→ 04:10 Injecting our function into Newton's Method
→ 04:54 Drawing the Tangent Line
→ 06:58 Using the Tangent Line to find the next guess
→ 08:16 General Formulation of Newton's Method
→ 09:35 Applying the Method to Square Roots
→ 11:07 Conclusion / Summary

11:21 Writing The Code
→ 11:42 Starting the Function
→ 12:03 Discussion of Terminating Condition
→ 12:46 Making the First guess
→ 13:21 Difference variable for termination
→ 13:34 Building the main loop / applying Newton's Method
→ 14:23 Building terminating mechanism
→ 15:32 Brief Trace of completed algorithm
→ 16:18 First test
→ 17:04 Comparing with "ground truth"
→ 17:34 Changing Error value
→ 17:50 Adding a counter to see the number of iterations
→ 19:12 Discussion of verbose version of the code

= 0612 TV =
0612 TV, a sub-project of NERDfirst.net, is an educational YouTube channel. Started in 2008, we have now covered a wide range of topics, from areas such as Programming, Algorithms and Computing Theories, Computer Graphics, Photography, and Specialized Guides for using software such as FFMPEG, Deshaker, GIMP and more!

Enjoy your stay, and don't hesitate to drop me a comment or a personal message to my inbox =) If you like my work, don't forget to subscribe!

Like what you see? Buy me a coffee → http://www.nerdfirst.net/donate/

0612 TV Official Writeup: http://nerdfirst.net/0612tv
More about me: http://about.me/lcc0612
Official Twitter:   / 0612tv  

= NERDfirst =
NERDfirst is a project allowing me to go above and beyond YouTube videos into areas like app and game development. It will also contain the official 0612 TV blog and other resources.

Watch this space, and keep your eyes peeled on this channel for more updates! http://nerdfirst.net/

-----

Disclaimer: Please note that any information is provided on this channel in good faith, but I cannot guarantee 100% accuracy / correctness on all content. Contributors to this channel are not to be held responsible for any possible outcomes from your use of the information.

Комментарии

Информация по комментариям в разработке