diff options
author | Martynas Venckus <martynas@cvs.openbsd.org> | 2009-04-11 20:03:22 +0000 |
---|---|---|
committer | Martynas Venckus <martynas@cvs.openbsd.org> | 2009-04-11 20:03:22 +0000 |
commit | 3006c130095f6097759a775ce732636429614162 (patch) | |
tree | ba7f53fb3f231af46c17aa266875559b5fcdb4d3 /lib/libm/noieee_src/n_floor.c | |
parent | 62bf6a2cbe5adf54f4ab03782e81e08d1ebcb2e9 (diff) |
in the old days compiler could not convert decimal constants
accurately, hence the tricks in libm, using machine representation
of constants. remove kludges and switch to use decimal constants,
much simplifying the code. since, the compiler converts them
accurately. generated values match on vaxfp
discussed with millert@, and miod@
testing todd@, and myself
ok millert@
Diffstat (limited to 'lib/libm/noieee_src/n_floor.c')
-rw-r--r-- | lib/libm/noieee_src/n_floor.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/libm/noieee_src/n_floor.c b/lib/libm/noieee_src/n_floor.c index 21a7444f392..050cfd4944b 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.11 2009/04/08 21:58:28 martynas Exp $ */ +/* $OpenBSD: n_floor.c,v 1.12 2009/04/11 20:03:21 martynas Exp $ */ /* $NetBSD: n_floor.c,v 1.1 1995/10/10 23:36:48 ragge Exp $ */ /* * Copyright (c) 1985, 1993 @@ -38,13 +38,7 @@ static char sccsid[] = "@(#)floor.c 8.1 (Berkeley) 6/4/93"; #include "mathimpl.h" -vc(L, 36028797018963968.0E0 ,0000,5c00,0000,0000, 55, 1.0) /* 2**55 */ - -ic(L, 4503599627370496.0E0, 52, 1.0) /* 2**52 */ - -#ifdef vccast -#define L vccast(L) -#endif +static const double L = 36028797018963968.0E0; /* * floor(x) := the largest integer no larger than x; |