RosettaCodeData/Task/Nth-root/Oforth/nth-root.fth

3 lines
99 B
Forth

Float method: nthroot(n)
1.0 doWhile: [ self over n 1 - pow / over - n / tuck + swap 0.0 <> ] ;