[Edu-sig] Brute force solutions
urnerk at qwest.net
Thu Sep 22 17:15:37 CEST 2005
> I've been considering this a bit. The closed form here begs the
> question, what is math.sqrt(5)? Sure, we have a built-in function that
> computes this, but someone had to write the algorithm that computes
> sqrt. That calculation makes use of numerical techniques similar to what
> we are discussing w.r.t. phi (much more efficient ones, of course).
Good point. A mathematician gets around this with a certain philosophy of
language that says "if I just write sqrt(5) -- using a surd -- that's
already infinitely precise." Then he gets to look down his nose at those
imprecise computer people who traffic in floating point evaluations.
Those floating point people don't have the benefit of "real numbers."
> In a sense, you could view your discussion as a look under the hood at
> possible implementations. In fact, I would think a good problem to
> tackle in a math class is to develop some algorithms for approximating
> square roots. Various "guess and check" techniques can be successful.
> Newton's method is vary good, and can easily be "derived"/motivated
> without actually looking at any of the calculus.
I've a couple times implemented the old manual algorithm for finding square
roots. I might be able to dig those up for discussion. The longer it runs,
the more digits you get.
More information about the Edu-sig