Век живи, век учись.
Banker's Rounding - Google Checkout uses banker's rounding for all financial calculations. Banker's rounding is the same as the traditional method of rounding numbers with one exception. In banker's rounding, if the number to be rounded is followed by a five and no additional nonzero digits, the number is rounded to the nearest even number. The following examples demonstrate the expected behavior in banker's rounding:
- 12.435 would be rounded up to 12.44. The number to be rounded (3) is rounded to the nearest even digit (4).
- 12.445 would be rounded down to 12.44. The number to be rounded (4) is not rounded because it is an even digit.
- 12.44501 would be rounded up to 12.45. The number to be rounded (4) is followed by a five and by additional nonzero digits.