summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/complex/cpow.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/complex/cpow.c')
-rw-r--r--libc-top-half/musl/src/complex/cpow.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/complex/cpow.c b/libc-top-half/musl/src/complex/cpow.c
new file mode 100644
index 0000000..1137d39
--- /dev/null
+++ b/libc-top-half/musl/src/complex/cpow.c
@@ -0,0 +1,8 @@
+#include "complex_impl.h"
+
+/* pow(z, c) = exp(c log(z)), See C99 G.6.4.1 */
+
+double complex cpow(double complex z, double complex c)
+{
+ return cexp(c * clog(z));
+}