inverse of a matrix with Fraction entries

casevh casevh at gmail.com
Sat Nov 27 17:23:19 CET 2010


On Nov 27, 4:00 am, m... at distorted.org.uk (Mark Wooding) wrote:
> casevh <cas... at gmail.com> writes:
> > I coded a quick matrix inversion function and measured running times
> > using GMPY2 rational and floating point types. For the floating point
> > tests, I used a precision of 1000 bits. With floating point values,
> > the running time grew as n^3. With rational values, the running time
> > grew as n^4*ln(n).
>
> Did you clear the denominators before you started?
>
> -- [mdw]

No. It more of an exercise in illustrating the difference between
arithmetic operations that have a constant running time versus those
that have an n*ln(n) or worse running time.

casevh



More information about the Python-list mailing list