The root-finder (p. y) uses Laguerre's method as told by Numerical Recipes 1st edition. This is subject to hitting a cycle that fails to progress toward the root. In that case the code perturbs the leading coefficient, just a little bit, and tries again, recursively. Unfortunately for the polynomial given here, the perturbation doesn't change things enough to reach convergence before stack exhaustion brings down the curtain.

I have put in some code from Numerical Recipes 2nd edition that hits Laguerre's method upside the head every now and again to get it off its cycle. This works for this polynomial, and will help for any polynomial like it that has a large cycle. There may be other problem cases but NR says they're very rare.

Will be in next beta/release.

Henry Rich

On 9/1/2016 2:09 AM, 'Jon Hough' via Programming wrote:
p. 49 1 0 0 0 1
also crashes J

(J804, Windows 7 64)
--------------------------------------------
On Tue, 8/30/16, Andrew Nikitin <[email protected]> wrote:

  Subject: [Jprogramming] p. bug
  To: "J programming" <[email protected]>
  Date: Tuesday, August 30, 2016, 10:21 PM
p. _48 1 0 0 0 1 crashes j.
  Tried with 803 and earlier.
  ----------------------------------------------------------------------
  For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

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

Reply via email to