From 009c7af638fd14d259805ee9734b870b755af8a4 Mon Sep 17 00:00:00 2001 From: Martynas Venckus Date: Tue, 9 Dec 2008 20:00:36 +0000 Subject: - 80-bit and quad precision trigonometric and other most important functions: acosl, asinl, atanl, atan2l, cosl, sinl, tanl, exp2l, frexpl, ilogbl, ldexpl, logbl, scalbnl, fabsl, hypotl, powl, sqrtl, rintl, copysignl, nanl, fdiml, fmaxl, fminl. mostly taken from freebsd, needed alot of changes to adapt. note, these are all c versions; and are quite slow when architectures have, e.g. sqrt. assembly versions will be added afterwards - make them .weak/__weak_alias to the double precision versions on other archs - no need to have two finites. finite() and finitef() are non-standard 3BSD obsolete versions of isfinite. remove from libm. make them weak_alias in libc to __isfinite and __isfinitef instead. similarly make 3BSD obsolete versions of isinf, isinff, isnan, isnanf weak_aliases to C99's __isinf, __isinff, __isnan, __isnanf - remove unused infinity.c. the c library has infinities for each supported platform - use STRICT_ASSIGN cast hack for _kernel_rem_pio2, so that the double version has a chance of working on i386 with extra precision - avoid storing multiple copies of the pi/2 array, since it won't vary - bump major due to removed finite/finitef. although they will be in libc, which anything is linked to, minor bump might be enough ok millert@. tested by sthen@, jsg@, ajacoutot@, kili@, naddy@ --- lib/libm/arch/hppa/s_rint.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib/libm/arch/hppa/s_rint.c') diff --git a/lib/libm/arch/hppa/s_rint.c b/lib/libm/arch/hppa/s_rint.c index e25f7291e6b..1f06be47f36 100644 --- a/lib/libm/arch/hppa/s_rint.c +++ b/lib/libm/arch/hppa/s_rint.c @@ -3,10 +3,12 @@ */ #if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: s_rint.c,v 1.2 2002/09/11 15:16:52 mickey Exp $"; +static char rcsid[] = "$OpenBSD: s_rint.c,v 1.3 2008/12/09 20:00:35 martynas Exp $"; #endif -#include "math.h" +#include +#include +#include double rint(double x) @@ -15,3 +17,9 @@ rint(double x) return (x); } + +#if LDBL_MANT_DIG == 53 +#ifdef __weak_alias +__weak_alias(rintl, rint); +#endif /* __weak_alias */ +#endif /* LDBL_MANT_DIG == 53 */ -- cgit v1.2.3