summaryrefslogtreecommitdiff
path: root/src/complex/carg.c
blob: 78b32a9c4c25dff3dc7118f767fe3987856064e6 (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 <complex.h>
#include <math.h>
#include "_tgmath.h"

TYPE TGFN(carg)(TYPE complex z)
{
	SIGNAL_SAFE(0);
	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)
*/