[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Symbolic equation solving in Lua
- From: Gavin Wraith <gavin@...>
- Date: Mon, 30 Apr 2018 12:33:54 +0100
Oh *******!. That line should have been
while math.abs(g-f(g)) > epsilon do
in the definition of fixpoint. The moral is, if you actually want to understand
what you are doing rather than simply use a "package", then read up
on the Newton-Raphson method of finding fixpoints (Wikipedia is your friend),
read SICP (Structure and Interpretation of Computer Programs) by Abelson
and Sussman, who cover the whole business rather readably, and translate from
Scheme to Lua. That way you will avoid the stupid mistakes of dumbasses like me
and you will be doing yourself a favour, and perhaps enjoy yourself.
--
Gavin Wraith (gavin@wra1th.plus.com)
Home page: http://www.wra1th.plus.com/