Chromium Code Reviews| Index: fusl/src/complex/csin.c |
| diff --git a/fusl/src/complex/csin.c b/fusl/src/complex/csin.c |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ad8ae67ad99a59983cd00b6fbd5fe83b2071e667 |
| --- /dev/null |
| +++ b/fusl/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(CMPLX(-cimag(z), creal(z))); |
| + return CMPLX(cimag(z), -creal(z)); |
| +} |