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