2011-08-12 21:01:25 +02:00
|
|
|
/*
|
|
|
|
* cabs() wrapper for hypot().
|
|
|
|
*
|
|
|
|
* Written by J.T. Conklin, <jtc@wimsey.com>
|
|
|
|
* Placed into the Public Domain, 1994.
|
|
|
|
*/
|
|
|
|
|
2012-04-09 02:03:36 +02:00
|
|
|
#include "cdefs-compat.h"
|
2011-12-15 07:16:26 +01:00
|
|
|
//__FBSDID("$FreeBSD: src/lib/msun/src/w_cabs.c,v 1.7 2008/03/30 20:03:06 das Exp $");
|
2011-08-12 21:01:25 +02:00
|
|
|
|
|
|
|
#include <float.h>
|
2011-12-15 07:24:24 +01:00
|
|
|
#include <openlibm.h>
|
2015-01-09 13:30:44 +01:00
|
|
|
#include <openlibm_complex.h>
|
|
|
|
|
2013-08-03 11:15:47 +02:00
|
|
|
#include "math_private.h"
|
2011-08-12 21:01:25 +02:00
|
|
|
|
2013-08-03 11:15:47 +02:00
|
|
|
DLLEXPORT double
|
2011-08-12 21:01:25 +02:00
|
|
|
cabs(double complex z)
|
|
|
|
{
|
|
|
|
return hypot(creal(z), cimag(z));
|
|
|
|
}
|
|
|
|
|
|
|
|
#if LDBL_MANT_DIG == 53
|
|
|
|
__weak_reference(cabs, cabsl);
|
|
|
|
#endif
|