This makes it easier to build musl math code with a compiler that does not support complex types (tcc) and in general more sensible factorization of the internal headers.
9 lines
138 B
C
9 lines
138 B
C
#include "complex_impl.h"
|
|
|
|
/* cos(z) = cosh(i z) */
|
|
|
|
double complex ccos(double complex z)
|
|
{
|
|
return ccosh(CMPLX(-cimag(z), creal(z)));
|
|
}
|