From 2ec558739e6bd32365e1a883889f9d5372b35719 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 2 Sep 2015 19:16:07 +0200 Subject: 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). --- Python/pytime.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Python/pytime.c') diff --git a/Python/pytime.c b/Python/pytime.c index ffb390afe56..02a1edfea06 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 */ -- cgit v1.2.3