musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/complex/csin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/complex/csin.c')
-rw-r--r--src/complex/csin.c 9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/complex/csin.c b/src/complex/csin.c
new file mode 100644
index 00000000..246a4595
--- /dev/null
+++ b/src/complex/csin.c
@@ -0,0 +1,9 @@
+#include "libm.h"
+
+/* sin(z) = -i sinh(i z) */
+
+double complex csin(double complex z)
+{
+ z = csinh(cpack(-cimag(z), creal(z)));
+ return cpack(cimag(z), -creal(z));
+}
generated by cgit v1.2.1 (git 2.18.0) at 2025年10月04日 05:19:22 +0000

AltStyle によって変換されたページ (->オリジナル) /