blob: fb7c971b3f676652c996af06d9cdf08b32c53190 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#include "__complex.h" // for cchshf
#include <complex.h> // for crealf, cimagf, complex, csinf, I
#include <math.h> // for cosf, sinf
float complex csinf(float complex z)
{
float ch, sh;
cchshf(cimagf(z), &ch, &sh);
return sinf(crealf(z)) * ch + (cosf(crealf(z)) * sh) * I;
}
|