diff options
author | Benjamin Peterson <benjamin@python.org> | 2017-09-11 06:50:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-11 06:50:46 (GMT) |
commit | 2bb69a5b4e7f96cb35d1b28aa7b7b3974b351f59 (patch) | |
tree | b7f672d07435aff1060d27f20867365e637b8df9 /Python/getargs.c | |
parent | 252033d50effa08046ac34fcc406bc99796ab88b (diff) | |
download | cpython-2bb69a5b4e7f96cb35d1b28aa7b7b3974b351f59.zip cpython-2bb69a5b4e7f96cb35d1b28aa7b7b3974b351f59.tar.gz cpython-2bb69a5b4e7f96cb35d1b28aa7b7b3974b351f59.tar.bz2 |
bpo-31373: remove overly strict float range checks (#3486)
This undoes a853a8ba7850381d49b284295dd6f0dc491dbe44 except for the pytime.c
parts. We want to continue to allow IEEE 754 doubles larger than FLT_MAX to be
rounded into finite floats. Tests were added to very this behavior.
Diffstat (limited to 'Python/getargs.c')
-rw-r--r-- | Python/getargs.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/Python/getargs.c b/Python/getargs.c index 0b155a1..dd7ca9f 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -859,10 +859,6 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags, double dval = PyFloat_AsDouble(arg); if (PyErr_Occurred()) RETURN_ERR_OCCURRED; - else if (dval > FLT_MAX) - *p = (float)INFINITY; - else if (dval < -FLT_MAX) - *p = (float)-INFINITY; else *p = (float) dval; break; |