first commit of the new libm!
[musl] / src / complex / cpow.c
diff --git a/src/complex/cpow.c b/src/complex/cpow.c
new file mode 100644 (file)
index 0000000..f863588
--- /dev/null
@@ -0,0 +1,8 @@
+#include "libm.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));
+}