Message-ID: <4B43679E.6040609@biostat.ku.dk>
Date: 2010-01-05T16:23:58Z
From: Peter Dalgaard
Subject: solving cubic/quartic equations non-iteratively
In-Reply-To: <alpine.LSU.1.00.1001051602490.30738@shannon.math.ku.dk>
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-iterative and that solve mentioned
> equations exists?
As far as I know, we don't even have the quadratic...
They can't be hard to implement, though. However, you may need to take
care that non-iterative solutions are not necessarily more precise or
even faster than iterative ones. There may be cancellation issues and
the closed-form expressions can be complicated and involve slow function
calls.
--
O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907