summaryrefslogtreecommitdiff
path: root/src/complex/creal.c
blob: 2e9923ed58e2bdc9dcb9ea2288dedcff3b42ff35 (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
25
26
27
# define TGSOURCE "../complex/creal.c"
#include "_tgmath.h"

#include <complex.h>

TYPE TGFN(creal)(TYPE complex z)
{
	union {
		complex TYPE c;
		TYPE f[2];
	} u = { .c = z };
	return u.f[0];
}

/*d
The creal functions compute the real part of z. 165)
d*/

/*r
The creal functions return the real part value.
r*/

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