roots ( x t -- seq )


Vocabulary
math.functions

Inputs and outputs
xa number
tan integer
seqa sequence


Word description
Outputs the t roots of a number x.

Notes
The results are not necessarily real.

Definition
USING: kernel math math.constants sequences ;

IN: math.functions

: roots ( x t -- seq )
[ [ log ] [ recip ] bi* * e^ ]
[ recip 2pi * 0 swap complex boa e^ ]
[ iota [ ^ * ] with with map ] tri ;