nth-root ( n x -- y )
Factor documentation > Factor handbook > The language > Numbers > Mathematical functions > Powers and logarithms
Prev:sigmoid ( x -- y )
Next:abs ( x -- y )


Vocabulary
math.functions

Inputs and outputs
nan integer
xa number
ya number


Word description
Calculates the nth root of a number, such that y^n=x.

Definition
USING: kernel math ;

IN: math.functions

: nth-root ( n x -- y ) swap recip ^ ; inline