1 1.1 drochner /* 2 1.1 drochner * cabsf() wrapper for hypotf(). 3 1.1 drochner * 4 1.1 drochner * Written by J.T. Conklin, <jtc (at) wimsey.com> 5 1.1 drochner * Placed into the Public Domain, 1994. 6 1.1 drochner */ 7 1.1 drochner 8 1.1 drochner #include <sys/cdefs.h> 9 1.1 drochner #if defined(LIBM_SCCS) && !defined(lint) 10 1.1 drochner __RCSID("$NetBSD: compat_cabsf.c,v 1.1 2007/02/22 22:08:19 drochner Exp $"); 11 1.1 drochner #endif 12 1.1 drochner 13 1.1 drochner #include <math.h> 14 1.1 drochner 15 1.1 drochner struct complex { 16 1.1 drochner float x; 17 1.1 drochner float y; 18 1.1 drochner }; 19 1.1 drochner 20 1.1 drochner float cabsf __P((struct complex)); 21 1.1 drochner __warn_references(cabsf, "warning: reference to compatibility cabsf()"); 22 1.1 drochner 23 1.1 drochner float 24 1.1 drochner cabsf(struct complex z) 25 1.1 drochner { 26 1.1 drochner 27 1.1 drochner return hypotf(z.x, z.y); 28 1.1 drochner } 29