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













                                                    
#include "libm.h"

// FIXME

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

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