From ca69e4f334b0df27038c3c874e1a60fac5050b43 Mon Sep 17 00:00:00 2001 From: das Date: Sun, 30 Mar 2008 20:03:06 +0000 Subject: Alias hypotl() and cabsl() for platforms where long double is the same as double. --- lib/msun/src/e_hypot.c | 6 ++++++ lib/msun/src/w_cabs.c | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'lib/msun') diff --git a/lib/msun/src/e_hypot.c b/lib/msun/src/e_hypot.c index 30177fb..fb498c1 100644 --- a/lib/msun/src/e_hypot.c +++ b/lib/msun/src/e_hypot.c @@ -46,6 +46,8 @@ __FBSDID("$FreeBSD$"); * than 1 ulps (units in the last place) */ +#include + #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 diff --git a/lib/msun/src/w_cabs.c b/lib/msun/src/w_cabs.c index eae6dc0..543b858 100644 --- a/lib/msun/src/w_cabs.c +++ b/lib/msun/src/w_cabs.c @@ -9,11 +9,15 @@ __FBSDID("$FreeBSD$"); #include +#include #include 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 -- cgit v1.1