Inexplicable result with scilab 5.0.2 and matrix multiplication
Christoph Dittmann
cd at dittmann-arheilgen.de
Mon Oct 13 23:32:56 CEST 2008
Hi,
I've got a problem with scilab 5.0.2. It seems to print certain values
wrong. The following example shows the problem:
-->M = [1,2;3,2]; C = M^(-1)*M
C =
2. 1.110D-16
1.110D-16 2.
This is what I get with scilab 5.0.2 on Ubuntu 8.04 (x86) using the
precompiled version from http://www.scilab.org/download/ . My problem
are the 2's on the diagonal since I've no idea where they come from.
With scilab 4.1.2, the one from the Ubuntu 8.04 repository, I get what I
expect:
-->M = [1,2;3,2]; C = M^(-1)*M
C =
1. 1.110D-16
5.551D-17 1.
Some further calculations with scilab 5.0.2 show that the problem seems
to lie in the printing of the result and not its actual numerical value:
-->x = C(1,1)
x =
2.
-->x * 2
ans =
2.
-->x + 0.01
ans =
1.01
Could that be a bug or did I just miss something crucial?
Thanks,
Christoph
More information about the users
mailing list