GNU bug report logs - #58929
29.0.50; Calc: finding roots utpn doesn't work as advertised

Previous Next

Package: emacs;

Reported by: Matt Armstrong <matt <at> rfc20.org>

Date: Mon, 31 Oct 2022 18:11:02 UTC

Severity: normal

Tags: patch

Found in version 29.0.50

Full log


Message #8 received at 58929 <at> debbugs.gnu.org (full text, mbox):

From: Mattias EngdegÄrd <mattiase <at> acm.org>
To: Matt Armstrong <matt <at> rfc20.org>
Cc: 58929 <at> debbugs.gnu.org
Subject: bug#58929: 29.0.50; Calc: finding roots utpn doesn't work as
 advertised
Date: Tue, 1 Nov 2022 17:51:11 +0100
Unfortunately straight Newton won't converge for this function (erf, essentially) if you stray too far from the origin (ie, the mean) so I suggest you always use that as a starting guess no matter what point you are trying to find the inverse for.

Another way is to use an interval as starting guess instead of a single point; that seems to make Calc switch tactics and persevere.

One thing that can happen is running out of stack, because many of the implementations like math-newton-root are recursive. This should be easy to remedy as they all seem to be tail calls.

Obviously the claim to guarantee a solution for "any initial guess" is fanciful.





This bug report was last modified 112 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.