Matrix: determinant for rectangular matrices should raise an error [patch]
$ rubydev -r matrix -e "puts Matrix1], , [3.determinant"
This corresponds to the documentation, but is not mathematically valid, since the determinant for rectangular matrices is not defined (at least for now! http://bit.ly/bwW7Gs )
I believe an error should be thrown, similar to:
$ rubydev -r matrix -e "puts Matrix1], , [3.trace"
trace': Matrix dimension mismatch (ExceptionForMatrix::ErrDimensionMismatch)'
Since this is an API change, I attached a patch and will wait for your approval before committing.
Updated by marcandre (Marc-Andre Lafortune) over 9 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r27160.
Marc-Andre, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.