python 2.x 에서 3이 되면서 round 함수가 바뀐거 같더라구요.
if two multiples are equally close, rounding is done toward the even choice (so, for example, both round(0.5) and round(-0.5) are 0, and round(1.5) is 2)
문서 보면 짝수 쪽으로 가는 거 같은데, 이런 식이면 원하는 값이 안나올 때가 있지 않나요...?
이번에 코딩 할 때도 +0.1 해주게 되었네요 ;;
다른 분들은 반올림 할 때 어떻게 하시나요?
kimwinner90 6년 전