]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
dtoa.c fix from upstream that fixes incorrectly rounded results for certain subnormal...
authorMark Dickinson <dickinsm@gmail.com>
Sat, 23 Jan 2010 21:25:53 +0000 (21:25 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Sat, 23 Jan 2010 21:25:53 +0000 (21:25 +0000)
Python/dtoa.c

index 6a93aef3bda13aaf3d5eb9b0d2c00dcd99c351ff..4b2c6c36e31a092e34ca2676a654868f9fb3df07 100644 (file)
@@ -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;