Alias hypotl() and cabsl() for platforms where long double is the same
as double.
This commit is contained in:
parent
2264157a42
commit
a641fc76eb
@ -46,6 +46,8 @@ __FBSDID("$FreeBSD$");
|
||||
* than 1 ulps (units in the last place)
|
||||
*/
|
||||
|
||||
#include <float.h>
|
||||
|
||||
#include "math.h"
|
||||
#include "math_private.h"
|
||||
|
||||
@ -123,3 +125,7 @@ __ieee754_hypot(double x, double y)
|
||||
return t1*w;
|
||||
} else return w;
|
||||
}
|
||||
|
||||
#if LDBL_MANT_DIG == 53
|
||||
__weak_reference(hypot, hypotl);
|
||||
#endif
|
||||
|
@ -9,11 +9,15 @@
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <complex.h>
|
||||
#include <float.h>
|
||||
#include <math.h>
|
||||
|
||||
double
|
||||
cabs(z)
|
||||
double complex z;
|
||||
cabs(double complex z)
|
||||
{
|
||||
return hypot(creal(z), cimag(z));
|
||||
}
|
||||
|
||||
#if LDBL_MANT_DIG == 53
|
||||
__weak_reference(cabs, cabsl);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user