summaryrefslogtreecommitdiff
path: root/lib/libm/ctanhl.c
blob: 9b798080d70bd7e29337634a5c3ff44de1105932 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <math.h>
#include <complex.h>

long double complex ctanhl(long double complex z)
{
	long double x, y, d;

	x = creall(z);
	y = cimagl(z);
	d = coshl(2.0L * x) + cosl(2.0L * y);

	return sinhl(2.0L * x) / d +
	       (sinl(2.0L * y) / d) * (long double complex)I;
}