Hi Chris,
version 3.04/02 had a bug in the inversion of a 3x3 matrix.
(see http://root.cern.ch/root/roottalk/roottalk03/1670.html)
introduced on 2002-10-23 22:47 see http://root.cern.ch/root/html/examples/V3.05.txt.html
It has been resolved in 3.05/05:
Matrix 3x3 is as follows
| 0 | 1 | 2 |
------------------------------------------------------------------
0 | -8.761e-05 7.804e-05 -1.808e-05
1 | -0.0003604 0.0001103 2.77e-05
2 | 0.009239 -0.01581 -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 | 1 9.04e-18 3.801e-19
1 | -6.133e-17 1 2.625e-18
2 | 2.71e-16 3.039e-15 1
Matrix 3x3 is as follows
| 0 | 1 | 2 |
------------------------------------------------------------------
0 | 1 1.588e-16 8.545e-18
1 | 6.062e-17 1 -9.11e-18
2 | -7.294e-17 4.407e-16 1
Eddy
>
> This is a multi-part message in MIME format.
> --------------020100030700040203070704
> Content-Type: text/plain; charset=us-ascii; format=flowed
> Content-Transfer-Encoding: 7bit
>
> 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
>
> --------------020100030700040203070704
> Content-Type: text/plain;
> name="testMatrix.C"
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline;
> filename="testMatrix.C"
>
> {
> 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();
>
>
> }
>
>
> --------------020100030700040203070704--
>
>
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET