From 8cd0a66a0fd7bb7d69153906942930c2e8c3dd17 Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Sat, 23 Jan 2010 21:25:53 +0000 Subject: [PATCH] dtoa.c fix from upstream that fixes incorrectly rounded results for certain subnormals that are also halfway cases. --- Python/dtoa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Python/dtoa.c b/Python/dtoa.c index 6a93aef3bda..4b2c6c36e31 100644 --- a/Python/dtoa.c +++ b/Python/dtoa.c @@ -2084,9 +2084,9 @@ _Py_dg_strtod(const char *s00, char **se) if (!odd) break; if (dsign) - dval(&rv) += ulp(&rv); + dval(&rv) += sulp(&rv, &bc); else { - dval(&rv) -= ulp(&rv); + dval(&rv) -= sulp(&rv, &bc); if (!dval(&rv)) { if (bc.nd >nd) break;