Date: Aug 31, 2012 12:48 AM
Author: kirby urner
Subject: Re: Square root of six
On Thu, Aug 30, 2012 at 4:42 PM, Peter Duveen <email@example.com> wrote:
> Kirby, there is a nice method to calculate the log of a number using continued fractions.
> Say, you have 4 = 10^x. This method allows you to evolve a numerical value for x by solving that equation using continued fractions. It's a bit tedious, but interesting. Curious and thoughtful students will always wonder how they can actually calculate the log of a number from first principles. A teacher should be able to supply an answer.
Yes, I agree. If the student is developing fluency with a language
for automating algorithms, then all the tedium in working it through a
first time, when writing tests and the program, pays off in the form
of a running asset which may be then incorporated into additional
I've had interests similar to yours in finding 2nd roots and awhile
back implemented some well-known algorithm. I'm not revisiting the
details tonight, although I did tweak the code for the latest Python
for testing purposes.
Here's the older version: http://4dsolutions.net/ocn/python/roots.py
For root(10) it gives me 316227766016837933199889354443 in 30
iterations, I notice without using a decimal point. I'm pretty sure
I'm implementing this one:
> This method is in a mid-nineteenth century mathematics text I came across in Google Books.
> Another method that was not taught in my student days is polynomial division. Newton was familiar with the method, and uses it to expand an expression into an infinite series. I used it recently to derive a formula for the difference between two variables, each raised to the nth power, where n is an integer. The answer is something like a^n - b^n = (a - b)[a^(n-1)b + a^(n-2)b^2....+ ab^(n-2) + b^(n-1)].
I've done some work with continued fractions as well. Example:
When I was little, there were no affordable computers, not even
scientific calculators for individuals (those came out around the time
I was in high school).
Then came the PC revolution, then the Open Source revolution.
Yet so many are still stuck using those scientific calculators, as if
the technology froze in 1970 or whatever. STEM is changing that.