Handbook
Glossary
>polar ( z -- abs arg )
Factor handbook
»
The language
»
Numbers
»
Mathematical functions
»
Powers and logarithms
Prev:
arg ( z -- arg )
Next:
polar> ( abs arg -- z )
Vocabulary
math
.
functions
Inputs
z
a
number
Outputs
abs
a non-negative real number
arg
a number in the interval
(-pi,pi]
Word description
Converts a complex number into an absolute value and argument (polar form).
Definition
USING:
kernel
math
math.libm
;
IN:
math.functions
:
>polar
( z -- abs arg )
>float-rect
[
[
sq
]
bi@
+
fsqrt
]
[
swap
fatan2
]
2bi
;
inline