(01-16-2015 02:15 PM)Werner Wrote: Ah OK.
Two remarks here:
- the condition number of the matrix is 3e15, meaning that very small perturbations in the input lead to huge changes in the calculated solution - exactly what we see here.
- And then, to solve Ly = Pb or Uy=x, simply use / instead of INV SWAP *. Faster and more accurate, but of course not in this case.
(now you get [-1621.7 -1592.3 4820 ], equally meaningless, but that's what the condition number tells you)
Calculating Ax=b with / vs with LU and then manually doing the triangular solves makes a difference: the former uses 15 digits throughout, while the second has the intermediate amounts that make up L and U rounded to 12 digits. And that small difference is enough to completely change the calculated solution.
Werner
Aha! Thank you so much for your patience, Werner!