cis ( arg -- z ) (original) (raw)
cis ( arg -- z )
Factor handbook » The language » Numbers » Mathematical functions » Powers and logarithms
Prev: | e^ ( x -- e^x ) |
---|---|
Next: | log ( x -- y ) |
Inputs
arg | a real number |
---|
Outputs
z | a complex number on the unit circle |
---|
Word description
Computes a point on the unit circle using Euler's formula for e^(arg*i).
See also
e^
Definition
USING: kernel math math.libm ;
: cis ( arg -- z ) >float [ fcos ] [ fsin ] bi rect> ; inline