Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 16 May 2002 @ 18:11:17 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Rounding in Teradata
 
From:   Buckland

Teradata follows the IEEE standard for rounding, which is exactly what you laid out. If the number next to the 5 is even it rounds down. If it is odd it rounds up. Or restating "the 5 rounds to the closest even number".

Here's the reason for that -- It keeps the sum from getting a systematic error. Many people think that any '5' should round up (or down). If anything that ends in 5 rounds up then the sum of a large list will have a slight upward bias. Essentially 1,2,3,4 would round down and 5,6,7,8,9 would round up (numbers ending in 0 don't round). So the sum of large column of these rounded numbers would likely be slightly larger than the actual sum of the non rounded numbers.

By dividing the numbers ending in 5 (half up, half down) the errors introduced by rounding cancel themselves out. Therefore a large sum of these numbers won't have an upward (or downward) bias. If you change how things round be sure that a slight upward bias of the rounded numbers isn't important.

Mike Buckland



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016