summaryrefslogtreecommitdiff
path: root/lib/libm/noieee_src/n_floor.c
diff options
context:
space:
mode:
authorMartynas Venckus <martynas@cvs.openbsd.org>2008-12-09 20:00:36 +0000
committerMartynas Venckus <martynas@cvs.openbsd.org>2008-12-09 20:00:36 +0000
commit009c7af638fd14d259805ee9734b870b755af8a4 (patch)
tree6dff090904884ebfbb145505ec8c02b7e2b8613c /lib/libm/noieee_src/n_floor.c
parent9e5337fc957e6c7535daf2a109184402a542f1ec (diff)
- 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@
Diffstat (limited to 'lib/libm/noieee_src/n_floor.c')
-rw-r--r--lib/libm/noieee_src/n_floor.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/libm/noieee_src/n_floor.c b/lib/libm/noieee_src/n_floor.c
index 3e45d05e159..7a9f3d66399 100644
--- a/lib/libm/noieee_src/n_floor.c
+++ b/lib/libm/noieee_src/n_floor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: n_floor.c,v 1.8 2008/06/25 17:49:31 martynas Exp $ */
+/* $OpenBSD: n_floor.c,v 1.9 2008/12/09 20:00:35 martynas Exp $ */
/* $NetBSD: n_floor.c,v 1.1 1995/10/10 23:36:48 ragge Exp $ */
/*
* Copyright (c) 1985, 1993
@@ -33,7 +33,9 @@
static char sccsid[] = "@(#)floor.c 8.1 (Berkeley) 6/4/93";
#endif /* not lint */
-#include "math.h"
+#include <machine/cdefs.h>
+#include <math.h>
+
#include "mathimpl.h"
vc(L, 4503599627370496.0E0 ,0000,5c00,0000,0000, 55, 1.0) /* 2**55 */
@@ -121,3 +123,7 @@ rint(double x)
t = x + s; /* x+s rounded to integer */
return (t - s);
}
+
+#ifdef __weak_alias
+__weak_alias(rintl, rint);
+#endif /* __weak_alias */