cristicbz/scid — Issue #83: Wrong answer for inv(x.t) * y
Author: dsimcha
Created: 2011-12-26 02:07:35+00:00
State: open

import scid.matvec, std.stdio;

void main() {
auto x = Matrix!double([ [ 1, 2, 3 ], [ 1, 1, 1 ], [ 2, -1, 1 ] ]);
auto y = Matrix!double([ [ 1, 2, 0 ], [ -2, 3, 4 ], [ 0, 2, 1 ] ]);

writeln( eval(inv(x.t)*y).pretty );
}

Got:

-1 3 3;
1 -0.4 -1.4;
0 -0.2 -0.2

Should be:

0 -0.2 -0.2;
-1 3 3;
1 -0.4 -1.4