summaryrefslogtreecommitdiff
path: root/lib/libm/cabs.c
blob: 794525538f0d70cd7150cdccfb7ae35f9cd9adf7 (plain)
1
2
3
4
5
6
7
#include <complex.h> // for cabs, cimag, creal, complex
#include <math.h>    // for hypot

double cabs(double complex z)
{
	return hypot(creal(z), cimag(z));
}