From: Mark Dickinson Date: Sat, 23 Jan 2010 21:25:53 +0000 (+0000) Subject: dtoa.c fix from upstream that fixes incorrectly rounded results for certain subnormal... X-Git-Tag: v2.7a3~98 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8cd0a66a0fd7bb7d69153906942930c2e8c3dd17;p=thirdparty%2FPython%2Fcpython.git dtoa.c fix from upstream that fixes incorrectly rounded results for certain subnormals that are also halfway cases. --- diff --git a/Python/dtoa.c b/Python/dtoa.c index 6a93aef3bda1..4b2c6c36e31a 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;