carg, cargf, or cargl Subroutine

Purpose

Returns the complex argument value.

Syntax

#include <complex.h>

double carg (z)
double complex z;

float cargf (z)
float complex z;

long double cargl (z)
long double complex z;

Description

The carg, cargf, or cargl subroutine computes the argument (also called phase angle) of the z parameter, with a branch cut along the negative real axis.

Parameters

Item Description
z Specifies the value to be computed.

Return Values

The carg, cargf, or cargl subroutine returns the value of the argument in the interval [-pi , +pi].