Task

Implement the algorithm to compute the principal   nth   root   





A

n





{\displaystyle {\sqrt[{n}]{A}}}

   of a positive real number   A,   as explained at the   Wikipedia page.



   '`N X NP' =.  (0 { [)`(1 { [)`(2 { [)
   iter      =.  N %~ (NP * ]) + X % ] ^ NP
   nth_root  =:  (, , _1+[) iter^:_ f. ]
   10 nth_root 7131.5^10
7131.5