Archives of the TeradataForum
Message Posted: Wed, 06 Nov 2002 @ 14:17:31 GMT
Some programming languages use "Bankers rounding" which was developed as a more accurate method of rounding. With Bankers rounding, values below 0.5 go down and values above 0.5 go up. Values of exactly 0.5 go to the nearest even number. So 12.5 will be rounded down to 12 (as in the example on the right) and a value of 13.5 will be rounded up to 14.
The justification for bankers rounding is the list in the spreadsheet on the right. It shows the numbers 12.0 to 13.0 in steps of 0.1. There are 9 values that need to be rounded. Traditional rounding moves 5 of the 9 values up and 4 down - always. This is biased (1/9 more up than down). By moving 0.5 to the nearest even number it is now exactly 9 of the 18 numbers in each direction. It might not sound like much, but if it relates to interest calculations on billions of dollars, the difference in rounding calculations is still worth many millions of dollars.
Does Teradata use teh Bankers rounding method? It's seems to me yes but I cannot find this information in the documentation.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 15 Jun 2023|