diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-09-02 17:16:07 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-09-02 17:16:07 (GMT) |
commit | 2ec558739e6bd32365e1a883889f9d5372b35719 (patch) | |
tree | 96eebd9fb83fcc59feb0ee478f6cbd0d105a3d29 /Python/pytime.c | |
parent | 8cbb013553c07e2577d08c7046c0eee70d0c0b66 (diff) | |
download | cpython-2ec558739e6bd32365e1a883889f9d5372b35719.zip cpython-2ec558739e6bd32365e1a883889f9d5372b35719.tar.gz cpython-2ec558739e6bd32365e1a883889f9d5372b35719.tar.bz2 |
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 ffb390a..02a1edf 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 */ |