arg ( z -- arg ) (original) (raw)

arg ( z -- arg )
Factor handbook » The language » Numbers » Mathematical functions » Powers and logarithms

Prev: absq ( x -- y )
Next: >polar ( z -- abs arg )

Vocabulary
math.functions

Inputs

z a number

Outputs

arg a number in the interval (-pi,pi]

Word description
Computes the complex argument.

Definition

USING: kernel math.libm ;

IN: math.functions

: arg ( z -- arg ) >float-rect swap fatan2 ; inline