Monday, February 12, 2007

A lemurly formula for square roots

I did some math! And it works!

I've been researching continued fractions, aka fractions whose denominators are fractions whose denominators are fractions whose denominators are.... You get the picture. I'm slowly making progress with my programming language, and I want it to have a good math library, so, like I said, I've been researching these funny things called continued fractions, reading up on some freakin' genius by the name of Gosper who's probably long dead by now. Based on his method of converting continued fractions into matrix multiplications (using something he calls "homographic functions" but which Mr. Google calls "Mobius Transforms"), I've managed to actually come up with something useful. I highly doubt it's original (it's simple enough to be a math student's homework problem), but I did arrive at it on my own, so I'm kinda proud of it.

Below is my lunchtime derivation of a square-root formula, done on a napkin no less! This will give you the square-root of a (positive) number to any degree of precision you like: just stop multiplying matrices when you get tired or when your answer's good enough.


Blog Archive