]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/msun/src/w_cabs.c
libarchive: merge bugfixes from vendor branch
[FreeBSD/FreeBSD.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 <complex.h>
9 #include <float.h>
10 #include <math.h>
11
12 double
13 cabs(double complex z)
14 {
15         return hypot(creal(z), cimag(z));
16 }
17
18 #if LDBL_MANT_DIG == 53
19 __weak_reference(cabs, cabsl);
20 #endif