summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-12-02 14:05:13 (GMT)
committerGitHub <noreply@github.com>2024-12-02 14:05:13 (GMT)
commit23ab1f9ff14ed1c4fcc65cf74429bf4d7cd3db76 (patch)
tree03ac3669376bf3a0512e4e2da5ede3d007d17ab7 /Python/pythonrun.c
parentfd48d98df9c1b0cb36b38834cd1ce5020c0a60f3 (diff)
downloadcpython-23ab1f9ff14ed1c4fcc65cf74429bf4d7cd3db76.zip
cpython-23ab1f9ff14ed1c4fcc65cf74429bf4d7cd3db76.tar.gz
cpython-23ab1f9ff14ed1c4fcc65cf74429bf4d7cd3db76.tar.bz2
[3.13] gh-99880: document rounding mode for new-style formatting (GH-121481) (#126334)
The CPython uses _Py_dg_dtoa(), which does rounding to nearest with half to even tie-breaking rule. If that functions is unavailable, PyOS_double_to_string() fallbacks to system snprintf(). Since CPython 3.12, build requirements include C11 compiler *and* support for IEEE 754 floating point numbers (Annex F). This means that FE_TONEAREST macro is available and, per default, printf-like functions should use same rounding mode as _Py_dg_dtoa(). (cherry picked from commit 7d7d56d8b1147a6b85e1c09d01b164df7c5c4942) Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Diffstat (limited to 'Python/pythonrun.c')
0 files changed, 0 insertions, 0 deletions