Handbook
Glossary
cis ( arg -- z )
Factor handbook
»
The language
»
Numbers
»
Mathematical functions
»
Powers and logarithms
Prev:
e^ ( x -- e^x )
Next:
log ( x -- y )
Vocabulary
math
.
functions
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
;
IN:
math.functions
:
cis
( arg -- z )
>float
[
fcos
]
[
fsin
]
bi
rect>
;
inline