[ROOT] baffling TMatrixD inversion results

From: Chris Jillings (jillings@caltech.edu)
Date: Tue Jul 15 2003 - 03:33:27 MEST


Hi all,
    I am totally baffled by the output of the attached macro. It runs at 
the Root prompt.
    My output is

root [0] .x testMatrix.C

Matrix 3x3 is as follows

      |        0  |        1  |        2  |
------------------------------------------------------------------
    0 | -8.761e-05  -0.0003604    0.009239
    1 |  7.804e-05   0.0001103    -0.01581
    2 | -1.808e-05    2.77e-05   -0.001075


Matrix 3x3 is as follows

      |        0  |        1  |        2  |
------------------------------------------------------------------
    0 |      -2601       -3009      -33.82
    1 |       1069       -2126      -72.79
    2 | -3.809e+04        5405      -150.3

Matrix 3x3 is as follows

      |        0  |        1  |        2  |
------------------------------------------------------------------
    0 |     -352.1       50.97      -1.359
    1 |      602.1      -85.93       2.366
    2 |      41.01      -5.813      0.1601


Matrix 3x3 is as follows

      |        0  |        1  |        2  |
------------------------------------------------------------------
    0 |  -0.006424      0.6046       23.59
    1 |    -0.2582     -0.6217       43.57
    2 |      3.761       14.32      -437.2

Thanks and Cheers,

Chris


System and Root particulars:

Linux kernel  2.4.20-18.7
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113)

   *        W E L C O M E  to  R O O T       *
   *                                         *
   *   Version   3.04/02  18 December 2002   *


-- 
Chris Jillings
jillings@caltech.edu
http://www.krl.caltech.edu/~jillings/
(626) 395-2922


{
TMatrixD m(3,3);
TMatrixD n(3,3);

m[0][0] = -2600.61;
m[0][1] = -3009.4;
m[0][2] = -33.82;

m[1][0] = 1068.99;
m[1][1] = -2125.77;
m[1][2] = -72.79;

m[2][0] = -38087.3;
m[2][1] = 5404.86;
m[2][2] = -150.3;

n = m;
Double_t det;
m.Invert(&det);

m.Print();
n.Print();
(m*n).Print();
(n*m).Print();


}



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET