Skip to content

Latest commit

 

History

History

117_Round_a_number_even_(a.k.a._banker's_rounding)

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Bite 117. Round a number even (a.k.a. banker's rounding)

Description

Bankers Rounding is an algorithm for rounding quantities to integers, in which numbers which are equidistant from the two nearest integers are rounded to the nearest even integer. Thus, 0.5 rounds down to 0; 1.5 rounds up to 2. - source

Complete the function below that takes an float, returning it rounded even.