/* * cabs() wrapper for hypot(). * * Written by J.T. Conklin, * Placed into the Public Domain, 1994. */ #ifndef lint static const char rcsid[] = "$FreeBSD: src/lib/msun/src/w_cabs.c,v 1.4.36.1 2010/02/10 00:26:20 kensmith Exp $"; #endif /* not lint */ #include #include double cabs(z) double complex z; { return hypot(creal(z), cimag(z)); } double z_abs(z) double complex *z; { return hypot(creal(*z), cimag(*z)); }