Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/stdlib Revert the previous patch. It is not worth i...



details:   https://anonhg.NetBSD.org/src/rev/c1d4f73a44e2
branches:  trunk
changeset: 580461:c1d4f73a44e2
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Apr 24 23:29:06 2005 +0000

description:
Revert the previous patch. It is not worth it optimizing the code to avoid
compiler errors because it makes it gratutiously different.

diffstat:

 lib/libc/stdlib/strtod.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 6dfc2a955c35 -r c1d4f73a44e2 lib/libc/stdlib/strtod.c
--- a/lib/libc/stdlib/strtod.c  Sun Apr 24 21:43:03 2005 +0000
+++ b/lib/libc/stdlib/strtod.c  Sun Apr 24 23:29:06 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: strtod.c,v 1.47 2005/04/24 19:33:52 christos Exp $     */
+/*     $NetBSD: strtod.c,v 1.48 2005/04/24 23:29:06 christos Exp $     */
 
 /****************************************************************
  *
@@ -93,7 +93,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: strtod.c,v 1.47 2005/04/24 19:33:52 christos Exp $");
+__RCSID("$NetBSD: strtod.c,v 1.48 2005/04/24 23:29:06 christos Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -1742,8 +1742,9 @@
                         * example: 1.2e-307 .
                         */
                        if (y <= (P-1)*Exp_msk1 && aadj >= 1.) {
-                               int tmpadj = (int)(aadj + 0.5);
-                               aadj1 = (double)(dsign ? tmpadj : -tmpadj);
+                               aadj1 = (double)(int)(aadj + 0.5);
+                               if (!dsign)
+                                       aadj1 = -aadj1;
                                }
                        adj = aadj1 * ulp(value(rv));
                        value(rv) += adj;



Home | Main Index | Thread Index | Old Index