David Ward Lambert <[email protected]> wrote:
>    NB. Bring on the heavy weights!  Find one root.
>    NB. The other could be found by polynomial division
>    NB. which I'm quite sure is demonstrated in the  j phrases.
>    load'~addons/math/misc/amoeba.ijs'

YES! This is a _cool_ way to find a root. (He didn't ask for an
"efficient" way...) That file is very educational; the comments alone
are worth reading, let alone the J code.

There's a good discussion of advanced root finding, including a link
to full source code a fast and effective general root finder, at
http://arxiv.org/abs/1203.1034. (It's written in Fortran, but is
amazingly clear and well-written.) There's also a discussion of how to
find the "other root" in a quadratic, stably and without polynomial
division.

BUT... Is this truly the coolest way to find a root? I propose that
the coolest algorithm would be one that actually uses the concept of
cooling -- that is, simulated annealing. Has anyone here done
simulated annealing in J? It seems like a natural fit for J, and we
could actually treat the 2 complex roots as simply an array of 4
parameters for the annealing.

-Wm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to