]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - lib/msun/src/w_cabs.c
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.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 #include <sys/cdefs.h>
9 __FBSDID("$FreeBSD$");
10
11 #include <complex.h>
12 #include <float.h>
13 #include <math.h>
14
15 double
16 cabs(double complex z)
17 {
18         return hypot(creal(z), cimag(z));
19 }
20
21 #if LDBL_MANT_DIG == 53
22 __weak_reference(cabs, cabsl);
23 #endif