Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Wed, 09 Oct 2002 @ 12:39:23 GMT

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

Subj:   Re: Why isn't rounding working?
From:   Geoffrey Rommel

  I presume 200/3 is an integer division which does not take remainder or fractions for this purpose into account. All the other examples force a floating point division by one element being a real number.  

Since two replies have said this, I thought I should note that 200.0 / 3 is not a floating-point operation. Consider this:

select type(200.0);


The parser considers 200.0 to be of type decimal(4,1), so it will perform a decimal division. Decimals are stored internally as integers, and there is a DBS Control field that controls rounding (RoundHalfwayMagUp). I therefore infer that the rounding is done in Teradata code, not in Pentium circuitry.

  <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: 15 Jun 2023