oinkoink+unet / rexx.com (Bret Jolly) wrote in message news:<7e7131a1.0304201226.4808d97e / posting.google.com>...
> An old bug from ruby 1.6 is still unfixed in the ruby 1.8 preview.
[...]
This bug affects more than just the determinant (though I think the
underlying problem is the same).  Other methods need the mathn library
to work correctly.  For example:
irb(main):001:0> require 'matrix'
true
irb(main):002:0> m = Matrix[[1, 3], [2, 4]]
Matrix[[1, 3], [2, 4]]
irb(main):003:0> n = m.inv
Matrix[[-3, 2], [1, -1]]
irb(main):004:0> m*n
Matrix[[0, -1], [-2, 0]]
irb(main):005:0> require 'mathn'
true
irb(main):006:0> n = m.inv
Matrix[[-2, 3/2], [1, -1/2]]
irb(main):007:0> m*n
Matrix[[1, 0], [0, 1]]