xref: /relibc/openlibm/src/w_cabs.c (revision d07820351bed7d16f1f0a1ae0596a2e2b6f50aaf)
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 "cdefs-compat.h"
9 //__FBSDID("$FreeBSD: src/lib/msun/src/w_cabs.c,v 1.7 2008/03/30 20:03:06 das Exp $");
10 
11 #include <float.h>
12 #include <openlibm.h>
13 #include <openlibm_complex.h>
14 
15 #include "math_private.h"
16 
17 DLLEXPORT double
18 cabs(double complex z)
19 {
20 	return hypot(creal(z), cimag(z));
21 }
22 
23 #if LDBL_MANT_DIG == 53
24 __strong_reference(cabs, cabsl);
25 #endif
26