Cholesky decomposition: Difference between revisions
m
→{{header|Raku}}: disambiguate with '×', clarify function/value setup, add output
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
SqrtNegInf (talk | contribs) m (→{{header|Raku}}: disambiguate with '×', clarify function/value setup, add output) |
||
Line 3,098:
=={{header|Raku}}==
(formerly Perl 6)
<syntaxhighlight lang=raku line>sub cholesky(@A) {
my @L = @A »
for ^@A ->
}
}
.fmt('%3d').say for cholesky [
[25],
[15, 18],
Line 3,116 ⟶ 3,115:
];
.fmt('6.3f').say for cholesky [
[18, 22, 54, 42],
[22, 70, 86, 62],
Line 3,122 ⟶ 3,123:
[42, 62, 134, 106],
];</syntaxhighlight>
{{out}}
<pre> 5
3 3
-1 1 3
4.243 0.000 0.000 0.000
5.185 6.566 0.000 0.000
12.728 3.046 1.650 0.000
9.899 1.625 1.850 1.393</pre>
=={{header|REXX}}==
|