LU decomposition: Difference between revisions

m (→‎{{header|jq}}: handle ill-conditioned cases; give an ill-conditioned case (A))
Line 1,423:
(reduce range(0; $n) as $i
([$j, $m[$j][$j]|abs ];
($m[$i][$j]|abs) as $mxa
| if $mxa > .[1] then [ $i, $mxa ] else . end) | .[0]) as $row
| swap_rows( $j; $row)
) ;
2,490

edits