Re: [R] solving cubic/quartic equations non-iteratively

2010-01-22 Thread Stavros Macrakis
On Tue, Jan 5, 2010 at 5:25 PM, Carl Witthoft wrote: > quote: > > There are certainly formulas for solving polynomials numerically up to > 4th degree non-iteratively, but you will almost certainly get better results > using iterative methods. > > I must be missing something here. Why not use t

Re: [R] solving cubic/quartic equations non-iteratively -- comparisons

2010-01-08 Thread Larry Hotchkiss
. -36 0.666807156100 0. 8 # - # Larry Hotchkiss -- Message: 7 Date: Wed, 6 Jan 2010 13:03:14 +0100 Fr

Re: [R] solving cubic/quartic equations non-iteratively

2010-01-06 Thread Kasper Kristensen
Try, library(polynom) p <- polynomial(c(-8,14,-7,1)) solve(p) Kasper __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented,

Re: [R] solving cubic/quartic equations non-iteratively

2010-01-05 Thread Carl Witthoft
quote: There are certainly formulas for solving polynomials numerically up to 4th degree non-iteratively, but you will almost certainly get better results using iterative methods. endquote I must be missing something here. Why not use the analytic formulas for polynomials below 5th degree?

Re: [R] solving cubic/quartic equations non-iteratively

2010-01-05 Thread spencerg
standard square root computation requires an iteration. Spencer Peter Dalgaard wrote: Mads Jeppe Tarp-Johansen wrote: To R-helpers, R offers the polyroot function for solving mentioned equations iteratively. However, Dr Math and Mathworld (and other places) show in detail how to solve men

Re: [R] solving cubic/quartic equations non-iteratively

2010-01-05 Thread Peter Dalgaard
Mads Jeppe Tarp-Johansen wrote: > To R-helpers, > > R offers the polyroot function for solving mentioned equations iteratively. > > However, Dr Math and Mathworld (and other places) show in detail how to > solve mentioned equations non-iteratively. > > Do implementations for R that are non-itera

Re: [R] solving cubic/quartic equations non-iteratively

2010-01-05 Thread Stavros Macrakis
There are certainly formulas for solving polynomials numerically up to 4th degree non-iteratively, but you will almost certainly get better results using iterative methods. Even the much more trivial formula for the 2nd degree (quadratic) is tricky to implement correctly and accurately, see: * Ge

[R] solving cubic/quartic equations non-iteratively

2010-01-05 Thread Mads Jeppe Tarp-Johansen
To R-helpers, R offers the polyroot function for solving mentioned equations iteratively. However, Dr Math and Mathworld (and other places) show in detail how to solve mentioned equations non-iteratively. Do implementations for R that are non-iterative and that solve mentioned equations exis