Logo

Programming-Idioms

History of Idiom 81 > diff from v12 to v13

Edit summary for version 13 by :

Version 12

2015-10-29, 14:05:16

Version 13

2015-11-30, 12:37:31

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