Logo

Programming-Idioms

History of Idiom 81 > diff from v2 to v3

Edit summary for version 3 by :

Version 2

2015-09-01, 21:32:22

Version 3

2015-09-01, 21:32:27

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).