diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-09-02 19:16:07 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-09-02 19:16:07 +0200 |
commit | 2ec558739e6bd32365e1a883889f9d5372b35719 (patch) | |
tree | 96eebd9fb83fcc59feb0ee478f6cbd0d105a3d29 /Python/pytime.c | |
parent | 8cbb013553c07e2577d08c7046c0eee70d0c0b66 (diff) | |
download | cpython-git-2ec558739e6bd32365e1a883889f9d5372b35719.tar.gz |
Issue #23517: datetime.timedelta constructor now rounds microseconds to nearest
with ties going away from zero (ROUND_HALF_UP), as Python 2 and Python older
than 3.3, instead of rounding to nearest with ties going to nearest even
integer (ROUND_HALF_EVEN).
Diffstat (limited to 'Python/pytime.c')
-rw-r--r-- | Python/pytime.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/pytime.c b/Python/pytime.c index ffb390afe5..02a1edfea0 100644 --- a/Python/pytime.c +++ b/Python/pytime.c @@ -60,8 +60,7 @@ _PyLong_FromTime_t(time_t t) #endif } -/* Round to nearest with ties going away from zero (_PyTime_ROUND_HALF_UP). */ -static double +double _PyTime_RoundHalfUp(double x) { /* volatile avoids optimization changing how numbers are rounded */ |