mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
dtoa.c fix from upstream that fixes incorrectly rounded results for certain subnormals that are also halfway cases.
This commit is contained in:
parent
fc5290458d
commit
8cd0a66a0f
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue