Functions Index :: R :: RoundEven

[<< up one level]

Module:

numeric :: rounding

Definition:

RoundEven(float x)

Description:

Returns the closest even integer to its argument.

Rounding is made such that the previous odd integer (even - 1) rounds to even, ie all values inside the interval [even - 1..even + 1) round to even.

Examples:

re1 = RoundEven(7.0) # re1 == 8

re2 = RoundEven(8.999999) # re2 == 8

re3 = RoundEven(9.0) # re3 == 10

 

[<< top]