1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-05 09:14:03 +00:00

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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=177758
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