w_cabs.c revision 302408
1224006Shrs/* 2224006Shrs * cabs() wrapper for hypot(). 3224006Shrs * 4224006Shrs * Written by J.T. Conklin, <jtc@wimsey.com> 5224006Shrs * Placed into the Public Domain, 1994. 6224006Shrs */ 7224006Shrs 8224006Shrs#include <sys/cdefs.h> 9224006Shrs__FBSDID("$FreeBSD: stable/11/lib/msun/src/w_cabs.c 177758 2008-03-30 20:03:06Z das $"); 10224006Shrs 11224006Shrs#include <complex.h> 12224006Shrs#include <float.h> 13224006Shrs#include <math.h> 14224006Shrs 15224006Shrsdouble 16224006Shrscabs(double complex z) 17224006Shrs{ 18224006Shrs return hypot(creal(z), cimag(z)); 19224006Shrs} 20224006Shrs 21224006Shrs#if LDBL_MANT_DIG == 53 22224006Shrs__weak_reference(cabs, cabsl); 23224006Shrs#endif 24224006Shrs