Adelsbach/VSIPL
Core +DP Programming Reference Guide
DD-00017-015
Core +DP

2.1.1 vsip_arg_p - Compute Phase Angle of Complex Scalar

vsip_scalar_f vsip_arg_f(vsip_cscalar_f x); 
vsip_scalar_d vsip_arg_d(vsip_cscalar_d x);
Description

This function computes the phase angle (argument) of a complex scalar value. The phase angle θ is computed as:

θ= atan2(imag(x),real(x))

where atan2 is the two-argument arctangent function that correctly handles all quadrants of the complex plane.

The returned phase angle is in the range [-π,π] radians.

Parameters
Return Value