extend cmath (some of the functions are dummy)
[libm] / src / cmath / ctanl.c
diff --git a/src/cmath/ctanl.c b/src/cmath/ctanl.c
new file mode 100644 (file)
index 0000000..4b4c99b
--- /dev/null
@@ -0,0 +1,14 @@
+#include "libm.h"
+
+#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
+long double complex ctanl(long double complex z)
+{
+       return ctan(z);
+}
+#else
+long double complex ctanl(long double complex z)
+{
+       z = ctanhl(cpackl(-cimagl(z), creall(z)));
+       return cpackl(cimagl(z), -creall(z));
+}
+#endif