Arithmetic-geometric mean: Difference between revisions
→{{header|Perl 6}}: simplify
(→{{header|Perl 6}}: use the "approximately equal" operator) |
(→{{header|Perl 6}}: simplify) |
||
Line 1,305:
=={{header|Perl 6}}==
<lang perl6>sub agm( $a is copy, $g is copy ) {
return $a;
▲ given ($a + $g)/2, sqrt $a * $g {
}
|