Skip to content
This repository has been archived by the owner on Nov 18, 2023. It is now read-only.

inverse fails for invertible matrices with zero diagonal elements #34

Open
ezag opened this issue Aug 6, 2016 · 3 comments
Open

inverse fails for invertible matrices with zero diagonal elements #34

ezag opened this issue Aug 6, 2016 · 3 comments

Comments

@ezag
Copy link
Contributor

ezag commented Aug 6, 2016

inversre function fails with "Ratio has zero denominator" error for following test cases:

, testEquality "inverse (3)"
    ( inverse $ fromList 2 2 [0,1, 1,0]
    , Right $ fromList 2 2 [0,1, 1,0] :: Either String (Matrix Rational))
, testEquality "inverse (4)"
    ( inverse $ fromList 3 3 [1,0,0, 0,0,1, 0,1,0]
    , Right $ fromList 3 3 [1,0,0, 0,0,1, 0,1,0] :: Either String (Matrix Rational))
@Daniel-Diaz
Copy link
Owner

The inverse function needs a revision. I'll add the tests you proposed.

@ezag
Copy link
Contributor Author

ezag commented Sep 18, 2016

@Daniel-Diaz please consider pull request #39 - perhaps it fixes this?

@Daniel-Diaz
Copy link
Owner

Indeed, the tests are now passing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants