diff options
Diffstat (limited to 'lib/libm/csin.c')
| -rw-r--r-- | lib/libm/csin.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libm/csin.c b/lib/libm/csin.c new file mode 100644 index 00000000..1299f10a --- /dev/null +++ b/lib/libm/csin.c @@ -0,0 +1,8 @@ +#include "__complex.h" + +double complex csin(double complex z) +{ + double ch, sh; + cchsh(cimag(z), &ch, &sh); + return sin(creal(z)) * ch + (cos(creal(z)) * sh) * (double complex)I; +} |
