GNU bug report logs -
#58929
29.0.50; Calc: finding roots utpn doesn't work as advertised
Previous Next
Full log
Message #16 received at 58929 <at> debbugs.gnu.org (full text, mbox):
1 nov. 2022 kl. 23.00 skrev Matt Armstrong <matt <at> rfc20.org>:
> See attached patch for what I wish the docs had said all along
> (would have saved me a lot of time).
Thank you, I have not worked through your table to confirm all the details but it looks fine on the whole.
One detail: it's not just that the functions are "flat" (ie, all derivatives rapidly vanishing as we stray from the mean) but at least for the normal distribution, Newton actively diverges with a bad starting guess even if computed with infinite precision (draw the graph).
> I wonder if the implementation can be improved.
> https://www.gnu.org/software/emacs/manual/html_node/calc/Root-Finding.html
> suggests that there are some cases where calc will switch over to the
> bisection method. Perhaps the heuristics can be tweaked?
From what I can tell, bisection is used if there is an interval bracketing the root and either no derivative could be computed or Newton fails to converge. Clearly Newton is preferable when it converges since it's much faster than bisection.
We could employ special tactics by pattern-matching the function expression (perhaps according to your table); not sure if it would be worth the trouble.
Of course an actual numerical analyst would know immediately what to do. Is there one in the audience?
This bug report was last modified 113 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.