xref: /freebsd/lib/msun/src/w_cabs.c (revision 4fd2d3b6927878771635a3628ae1623daf810d39)
1 /*
2  * cabs() wrapper for hypot().
3  *
4  * Written by J.T. Conklin, <jtc@wimsey.com>
5  * Placed into the Public Domain, 1994.
6  */
7 
8 #include <sys/cdefs.h>
9 __FBSDID("$FreeBSD$");
10 
11 #include <complex.h>
12 #include <math.h>
13 
14 double
15 cabs(z)
16 	double complex z;
17 {
18 	return hypot(creal(z), cimag(z));
19 }
20