1994-08-11 00:30:00 +04:00
|
|
|
/*
|
|
|
|
* cabsf() wrapper for hypotf().
|
1999-07-02 19:37:33 +04:00
|
|
|
*
|
1994-08-11 00:30:00 +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)
|
2001-01-06 03:15:00 +03:00
|
|
|
__RCSID("$NetBSD: w_cabsf.c,v 1.4 2001/01/06 00:15:00 christos Exp $");
|
1997-10-09 15:34:16 +04:00
|
|
|
#endif
|
|
|
|
|
2001-01-06 03:15:00 +03:00
|
|
|
#define __MATH_PRIVATE__
|
1997-10-09 15:34:16 +04:00
|
|
|
#include <math.h>
|
1994-08-11 00:30:00 +04:00
|
|
|
|
|
|
|
struct complex {
|
|
|
|
float x;
|
|
|
|
float y;
|
|
|
|
};
|
|
|
|
|
1997-10-09 15:34:16 +04:00
|
|
|
float cabsf __P((struct complex));
|
|
|
|
|
1994-08-11 00:30:00 +04:00
|
|
|
float
|
|
|
|
cabsf(z)
|
|
|
|
struct complex z;
|
|
|
|
{
|
|
|
|
return hypotf(z.x, z.y);
|
|
|
|
}
|