]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - lib/msun/src/w_cabs.c
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.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
8 #ifndef lint
9 static const char rcsid[] =
10   "$FreeBSD$";
11 #endif /* not lint */
12
13 #include <complex.h>
14 #include <math.h>
15
16 double
17 cabs(z)
18         double complex z;
19 {
20         return hypot(creal(z), cimag(z));
21 }
22
23 double
24 z_abs(z)
25         double complex *z;
26 {
27         return hypot(creal(*z), cimag(*z));
28 }