imaginary-part ( z -- y )
Factor handbook » The language » Numbers » Complex numbers

Prev:real-part ( z -- x )
Next:>rect ( z -- x y )


Vocabulary
math

Inputs
za number


Outputs
ya real


Word description
Outputs the imaginary part of a complex number. This outputs zero for real numbers.

Examples
USING: math prettyprint ; C{ 1 2 } imaginary-part .
2

USING: math prettyprint ; 3 imaginary-part .
0


Definition


Methods