Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libm/complex/creall.c')
-rw-r--r--newlib/libm/complex/creall.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/newlib/libm/complex/creall.c b/newlib/libm/complex/creall.c
new file mode 100644
index 000000000..7aa88c272
--- /dev/null
+++ b/newlib/libm/complex/creall.c
@@ -0,0 +1,16 @@
+/* Copyright (C) 2015 by Red Hat, Incorporated. All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * is freely granted, provided that this notice is preserved.
+ */
+
+#include <complex.h>
+#include "../common/fdlibm.h"
+
+long double
+creall (long double complex z)
+{
+ long_double_complex w = { .z = z };
+
+ return (REAL_PART(w));
+}