Wednesday, December 2, 2009

When Math Software Fails!

You may already have heard of an embarrasing problem with MS Excel 2007. It was reported on groups.google, a couple of years ago, in a simple email:
I heard about it when someone posted a printout of the following essay ("Arithmetic is Hard - To Get Right") on a bulletin board right outside the kitchen in my department.

A couple of days ago, I heard about a serious problem with Matlab R2009b. Apparently, when you try to solve this simple 2x2 linear system:
A=[ 0 2 ; 1 0 ];
b=[ 2 ; 0 ];
A'\b

ans =
0
1  
which is clearly wrong (A' is the transpose of A). Apparently, older versions of Matlab and the wonderful FOSS program which I use a lot, GNU Octave, do not have the same problem. They yield the correct solution

ans=
0
2

No comments: