<div dir="ltr"><div><div><div>I've just been bitten by a bad case of floating-point error with `matrix-solve` (and a bad CPU that has some floating-point issues):<br><br>(let ([n 0.8200000000000001 #;(+ (* .9 .9)(* .1 .1))])<br>

  (matrix-solve<br>   (matrix [[ 1  0 .9 1]<br>            [ 0  1 .1 1]<br>            [.9 .1  n 1]<br>            [ 1  1  1 0]])<br>   (col-matrix [0 0 0 1])))<br>; -> (array #[#[0.0] #[0.5] #[0.0] #[-0.5]])<br><br></div>

But clearly here  M×X≠B, as is easily seen on the last row.<br></div>I've seen other situations where the approximation leads to an approximate solution (which is okay of course), but this is the first case I see where the result is completely off.<br>

<br>I have no idea if anything can be done about it, though (apart from throwing my computer through the window and buy a better one).<br><br></div>Laurent<br></div>