summaryrefslogtreecommitdiff
path: root/src/complex/creal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/complex/creal.c')
-rw-r--r--src/complex/creal.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/complex/creal.c b/src/complex/creal.c
index 86f3cb1b..eac2576e 100644
--- a/src/complex/creal.c
+++ b/src/complex/creal.c
@@ -5,7 +5,11 @@
TYPE TGFN(creal)(TYPE complex z)
{
- return 0.0;
+ union {
+ complex TYPE c;
+ TYPE f[2];
+ } u = { .c = z };
+ return z[0];
}
/*d