From: Zinsser Date: 2006-02-02T06:46:08+09:00 Subject: Re: Is this a floating point precision problem? Todd S. wrote: > >> >> I don't get the same inverse; maybe that's a good place to look? >> > > That's strange. I ran it again and this time came up with a different > number... > > irb> a = Matrix[[-0.0108226964530337, -0.224934679233174, > -0.974313737622412], [0.0468247818757306, 0.973187905351297, > -0.225194894880513], [-0.998844486916645, 0.0480592442327619, 0.0]] > > irb> puts a.inverse > > Matrix[[8.0, 2.0, -0.998844486916645], [-0.25, 1.0, 0.0480592442327619], > [-0.974313737622412, -0.225194894880513, -2.16280922232366e-17]] > I tried it in C++ a: -0.0108227 -0.224935 -0.974314 0.0468248 0.973188 -0.225195 -0.998844 0.0480592 0 inverse of a: -0.0108227 0.0468248 -0.998844 -0.224935 0.973188 0.0480592 -0.974314 -0.225195 -7.06138e-16 a * inverse: 1 2.65358e-17 1.1294e-18 -6.53232e-18 1 -3.77082e-18 -8.77526e-19 9.58502e-18 1 Caleb is using a.inv, whereas you are using a.inverse. Perhaps that's your problem ...