inverse of a matrix with Fraction entries

Mark Wooding mdw at distorted.org.uk
Sat Nov 27 07:00:55 EST 2010


casevh <casevh 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]



More information about the Python-list mailing list