diff options
| author | christos <christos@NetBSD.org> | 2005-04-24 23:29:06 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2005-04-24 23:29:06 +0000 |
| commit | 631ccd61072e43c9130cef3c19bf416751512594 (patch) | |
| tree | 24da3541acf8b3f50e151edb0ea8feee84f71496 /lib/libc/stdlib | |
| parent | 9b9ed510b02c1d7a889c13b5f811243fec72f190 (diff) | |
Revert the previous patch. It is not worth it optimizing the code to avoid
compiler errors because it makes it gratutiously different.
Diffstat (limited to 'lib/libc/stdlib')
| -rw-r--r-- | lib/libc/stdlib/strtod.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libc/stdlib/strtod.c b/lib/libc/stdlib/strtod.c index 9492f56fa0f..bc01b7fbbcd 100644 --- a/lib/libc/stdlib/strtod.c +++ b/lib/libc/stdlib/strtod.c @@ -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 @@ strtod * 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; |
