Project

General

Profile

Actions

Bug #2582

closed

wrong determinant is calculated for matrix

Added by tammo (tammo tjarks) over 14 years ago. Updated about 13 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
[ruby-core:27507]

Description

=begin
when I calculate the determinant of the matrix
2 0 1
0 -2 2
1 2 3

i get with:
irb(main):001:0> require 'matrix'
=> true
irb(main):002:0> a = Matrix2,0,1],[0,-2,2],[1,2,3
=> Matrix2, 0, 1], [0, -2, 2], [1, 2, 3
irb(main):003:0> a.det
=> -20

but it should be -18
=end

Actions

Also available in: Atom PDF

Like0
Like0