Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/gdtoa pacify lint.



details:   https://anonhg.NetBSD.org/src/rev/4c788f604cd1
branches:  trunk
changeset: 763494:4c788f604cd1
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Mar 21 22:33:46 2011 +0000

description:
pacify lint.

diffstat:

 lib/libc/gdtoa/hdtoa.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r 610eb43e0d2c -r 4c788f604cd1 lib/libc/gdtoa/hdtoa.c
--- a/lib/libc/gdtoa/hdtoa.c    Mon Mar 21 22:33:29 2011 +0000
+++ b/lib/libc/gdtoa/hdtoa.c    Mon Mar 21 22:33:46 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hdtoa.c,v 1.6 2008/03/21 23:13:48 christos Exp $       */
+/*     $NetBSD: hdtoa.c,v 1.7 2011/03/21 22:33:46 christos Exp $       */
 
 /*-
  * Copyright (c) 2004, 2005 David Schultz <das%FreeBSD.ORG@localhost>
@@ -30,7 +30,7 @@
 #if 0
 __FBSDID("$FreeBSD: src/lib/libc/gdtoa/_hdtoa.c,v 1.4 2007/01/03 04:57:58 das Exp $");
 #else
-__RCSID("$NetBSD: hdtoa.c,v 1.6 2008/03/21 23:13:48 christos Exp $");
+__RCSID("$NetBSD: hdtoa.c,v 1.7 2011/03/21 22:33:46 christos Exp $");
 #endif
 
 #include <float.h>
@@ -161,8 +161,15 @@
                *decpt = 1;
                return (nrv_alloc("0", rve, 1));
        case FP_SUBNORMAL:
+#ifdef __vax__
+               /* (DBL_MAX_EXP=127 / 2) + 2 = 65? */
+               u.dblu_d *= 0x1p65;
+               *decpt = u.dblu_dbl.dbl_exp - (65 + DBL_ADJ);
+#endif
+               /* (DBL_MAX_EXP=1024 / 2) + 2 = 514? */
                u.dblu_d *= 0x1p514;
                *decpt = u.dblu_dbl.dbl_exp - (514 + DBL_ADJ);
+#endif
                break;
        case FP_INFINITE:
                *decpt = INT_MAX;



Home | Main Index | Thread Index | Old Index