Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libm/noieee_src XXX This is all wrong and needs new tabl...
details: https://anonhg.NetBSD.org/src/rev/0bd27dab5352
branches: trunk
changeset: 327606:0bd27dab5352
user: martin <martin%NetBSD.org@localhost>
date: Wed Mar 12 19:42:18 2014 +0000
description:
XXX This is all wrong and needs new tables and constants - but at least use
constants in the VAX double range for now, so it is compilable with newer
gcc.
diffstat:
lib/libm/noieee_src/n_exp2.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (41 lines):
diff -r 8bcc1550f65b -r 0bd27dab5352 lib/libm/noieee_src/n_exp2.c
--- a/lib/libm/noieee_src/n_exp2.c Wed Mar 12 18:59:07 2014 +0000
+++ b/lib/libm/noieee_src/n_exp2.c Wed Mar 12 19:42:18 2014 +0000
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: n_exp2.c,v 1.1 2014/03/06 10:55:57 martin Exp $");
+__RCSID("$NetBSD: n_exp2.c,v 1.2 2014/03/12 19:42:18 martin Exp $");
#ifdef __FBSDID
__FBSDID("$FreeBSD: src/lib/msun/src/s_exp2.c,v 1.7 2008/02/22 02:27:34 das Exp $");
#endif
@@ -39,7 +39,7 @@
#define TBLSIZE (1 << TBLBITS)
static const double
- huge = 0x1p1000,
+ huge = 0x1p126,
redux = 0x1.8p52 / TBLSIZE,
P1 = 0x1.62e42fefa39efp-1,
P2 = 0x1.ebfbdff82c575p-3,
@@ -47,7 +47,7 @@
P4 = 0x1.3b2ab88f70400p-7,
P5 = 0x1.5d88003875c74p-10;
-static volatile double twom1000 = 0x1p-1000;
+static volatile double twom1000 = 0x1p-100;
static const double tbl[TBLSIZE * 2] = {
/* exp2(z + eps) eps */
@@ -383,8 +383,8 @@
/* Scale by 2**(k>>20). */
if (big) {
- if (k == 1024 << 20)
- return (r * 2.0 * 0x1p1023);
+ /*if (k == 1024 << 20)
+ return (r * 2.0 * 0x1p1023); */
return (r * twopk);
} else {
return (r * twopk * twom1000);
Home |
Main Index |
Thread Index |
Old Index