Merge from vendor branch LIBPCAP:
[dragonfly.git] / lib / msun / src / w_cabs.c
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  * $FreeBSD: src/lib/msun/src/w_cabs.c,v 1.3.12.1 2001/11/23 16:16:18 dd Exp $
8  * $DragonFly: src/lib/msun/src/Attic/w_cabs.c,v 1.2 2003/06/17 04:26:53 dillon Exp $
9  */
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
21 double
22 z_abs(z)
23         double complex *z;
24 {
25         return hypot(creal(*z), cimag(*z));
26 }