[SciPy-user] Trivial quadratic equation question
Tue May 19 08:48:55 CDT 2009
On Wednesday 13 May 2009 18:54:31 Douglas Macdonald wrote:
> Thanks Christian. This looks like it will do the job. No point in
> reinventing the wheel.
Note that the NumPy root-finding function is very general, so can be much
slower than computing the well-known formula for quadratic roots - especially
if you also know something about the coefficients that can save time. I once had
an algorithm sped up by two orders of magnitude by implementing a tailored
formula for a quartic formula with the cubic and quadratic coefficients known to
be zero and some other specific knowledge.
In case anyone is wondering, this case arises in a lumped-elements network of
thermal components with radiative heat transfer making the quadratic and
conduction/convection making the linear part.
More information about the SciPy-user