w_cabs.c revision 177758
12116Sjkh/* 22116Sjkh * cabs() wrapper for hypot(). 38870Srgrimes * 42116Sjkh * Written by J.T. Conklin, <jtc@wimsey.com> 52116Sjkh * Placed into the Public Domain, 1994. 62116Sjkh */ 72116Sjkh 8176451Sdas#include <sys/cdefs.h> 9176451Sdas__FBSDID("$FreeBSD: head/lib/msun/src/w_cabs.c 177758 2008-03-30 20:03:06Z das $"); 1078172Sru 1178172Sru#include <complex.h> 12177758Sdas#include <float.h> 132116Sjkh#include <math.h> 142116Sjkh 152116Sjkhdouble 16177758Sdascabs(double complex z) 172116Sjkh{ 1878172Sru return hypot(creal(z), cimag(z)); 192116Sjkh} 20177758Sdas 21177758Sdas#if LDBL_MANT_DIG == 53 22177758Sdas__weak_reference(cabs, cabsl); 23177758Sdas#endif 24