Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 244 Bytes

Nth_root.md

File metadata and controls

15 lines (10 loc) · 244 Bytes
sub infix:<√>($n, $A) {
    .tail given $A / $n, { (($n-1) * $_+ $A / ($_** ($n-1))) / $n } ... * ≅ *;
}

use Test;
plan 9;
is-approx ($_√pi)**$_, pi for 2 .. 10;