History of Idiom 81 > diff from v20 to v21
Edit summary for version 21 by :
New Python implementation by user [TinyFawks]
New Python implementation by user [TinyFawks]
↷
Version 20
2016-01-15, 15:42:48
Version 21
2016-02-18, 09:18:33
Idiom #81 Round floating point number to integer
Declare integer y and initialize it with the rounded value of floating point number x .
Ties (when the fractional part of x is exactly .5) must be rounded up (to positive infinity).
Idiom #81 Round floating point number to integer
Declare integer y and initialize it with the rounded value of floating point number x .
Ties (when the fractional part of x is exactly .5) must be rounded up (to positive infinity).
Comments bubble
python 2.7 round() uses "to nearest, ties to positive infinity"