Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 31 May 2005 @ 20:46:01 GMT


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


Subj:   Re: Distance based on latitude and longitude
 
From:   Dempsey, Mike

The actual definition of PI is the ratio between the circumferance of a circle and its diameter.

This is (very approximately) 22/7.

3.14159 is MUCH more accurate than 22/7 but since Teradata allows 15 digits of accuracy you could look up the actual value (currently available up to about 1 million digits I think) and use the first 15 for as 'good as you can get'.)

Also remember to force all 'whole' numbers to Float by adding '.0' to the number ('7.0' rather than simply '7') to avoid possible rounding errors.


Mike Dempsey
Teradata Client Tools



     
  <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