[SciPy-user] Trivial quadratic equation question
Yosef Meller
yosefmel at post.tau.ac.il
Tue May 19 09:48:55 EDT 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
mailing list