Archives of the TeradataForum
Message Posted: Tue, 31 May 2005 @ 20:46:01 GMT
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
|