Coolest Python recipe of all time

Raymond Hettinger python at rcn.com
Tue May 3 12:32:19 EDT 2011


On May 2, 11:29 pm, Gregory Ewing <greg.ew... at canterbury.ac.nz> wrote:
> Terry Reedy wrote:
> > The trick is that replacing x with j and evaluating
> > therefore causes (in Python) all the coefficients of x (now j) to be
> > added together separately from all the constant terms to reduce the
> > linear equation to a*x+b (= 0 implied).
>
> Hmmm... so if we used quaternions, could we solve systems
> of linear equations in 3 variables?

Yes :-)

The implementation of a Quanternion class and the Quartic equation is
left as an exercise for the reader ;-)


Raymond
@raymondh



More information about the Python-list mailing list