summaryrefslogblamecommitdiff
path: root/src/complex/casinf.c
blob: 2cda2f086b252dd49378efbfe0c7b2074701d455 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
                         









                                     
                                                    

                                                           
 
#include "complex_impl.h"

// FIXME

float complex casinf(float complex z)
{
	float complex w;
	float x, y;

	x = crealf(z);
	y = cimagf(z);
	w = CMPLXF(1.0 - (x - y)*(x + y), -2.0*x*y);
	float complex r = clogf(CMPLXF(-y, x) + csqrtf(w));
	return CMPLXF(cimagf(r), -crealf(r));
}