Hi,
Today python (math) offers many tools to modify the float 5.49
into something else. int(), floor(), ceil()...
But i have not found an equivalent for something we were taught many, many decades ago:
int(5.49 + 0.50) wil give 5, but int(5.50 + 0.50) (and upwards) will give 6.
Kind of random rounding when distributing costs. Accountants liked that.
Question: what python function will do that without the hanky-panky of adding a half before truncating?
thx,
Paul
Today python (math) offers many tools to modify the float 5.49
into something else. int(), floor(), ceil()...
But i have not found an equivalent for something we were taught many, many decades ago:
int(5.49 + 0.50) wil give 5, but int(5.50 + 0.50) (and upwards) will give 6.
Kind of random rounding when distributing costs. Accountants liked that.
Question: what python function will do that without the hanky-panky of adding a half before truncating?
thx,
Paul