summaryrefslogtreecommitdiff
path: root/src/complex/creal.c
blob: c99578bda10fb33dadc5a5f6bfaaabeb28bf46fe (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)
{
	SIGNAL_SAFE(0);
	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)
*/