summaryrefslogtreecommitdiff
path: root/src/complex/carg.c
blob: 70bfba00bd941173ca3aed5e649f5cb539d90ffe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# define TGSOURCE "complex/carg.c"
#include "_tgmath.h"
#include "math.h"

#include <complex.h>

TYPE TGFN(carg)(TYPE complex z)
{
	return TGFN(atan2)(TGFN(cimag)(z), TGFN(creal)(z));
}

/*d
The carg functions compute the argument (also called phase angle) of z, with a branch
cut along the negative real axis.
d*/

/*r
The carg functions return the value of the argument in the interval [− π , + π ].
r*/

/*
STDC(199901)
LINK(m)
*/