NetBSD/lib/libm/compat/compat_cabsf.c

30 lines
538 B
C
Raw Normal View History

/*
* cabsf() wrapper for hypotf().
1999-07-02 19:37:33 +04:00
*
* Written by J.T. Conklin, <jtc@wimsey.com>
* Placed into the Public Domain, 1994.
*/
1997-10-09 15:34:16 +04:00
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
__RCSID("$NetBSD: compat_cabsf.c,v 1.2 2007/08/10 21:20:35 drochner Exp $");
1997-10-09 15:34:16 +04:00
#endif
#include "../src/namespace.h"
1997-10-09 15:34:16 +04:00
#include <math.h>
struct complex {
float x;
float y;
};
1997-10-09 15:34:16 +04:00
float cabsf __P((struct complex));
__warn_references(cabsf, "warning: reference to compatibility cabsf()");
1997-10-09 15:34:16 +04:00
float
cabsf(struct complex z)
{
return hypotf(z.x, z.y);
}