w_cabs.c revision 78172
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 878172Sru#ifndef lint 978172Srustatic const char rcsid[] = 1078172Sru "$FreeBSD: head/lib/msun/src/w_cabs.c 78172 2001-06-13 15:16:30Z ru $"; 1178172Sru#endif /* not lint */ 1278172Sru 1378172Sru#include <complex.h> 142116Sjkh#include <math.h> 152116Sjkh 162116Sjkhdouble 172116Sjkhcabs(z) 1878172Sru double complex z; 192116Sjkh{ 2078172Sru return hypot(creal(z), cimag(z)); 212116Sjkh} 224363Sljo 234363Sljodouble 244363Sljoz_abs(z) 2578172Sru double complex *z; 264363Sljo{ 2778172Sru return hypot(creal(*z), cimag(*z)); 284363Sljo} 29