Alias hypotl() and cabsl() for platforms where long double is the same

as double.
This commit is contained in:
David Schultz 2008-03-30 20:03:06 +00:00
parent 2264157a42
commit a641fc76eb
2 changed files with 12 additions and 2 deletions

View File

@ -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

View File

@ -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