help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: distance from Easter Island to Chile


From: Emanuel Berg
Subject: Re: distance from Easter Island to Chile
Date: Mon, 21 Apr 2014 03:50:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Emanuel Berg <embe8573@student.uu.se> writes:

> This is so exact it *could* be used in those "school
> essays" (in which I told not to use the Haversine
> method)

On the Wikipedia article on the Haversine, they mention
the other formula as well - though it is a bit hard to
make sense of... (What is "h"?)

"When using these formulae, ensure that h does not
 exceed 1 due to a floating point error (d is only real
 for h from 0 to 1). h only approaches 1 for antipodal
 points (on opposite sides of the sphere) — in this
 region, relatively large numerical errors tend to
 arise in the formula when finite precision is
 used. Because d is then large (approaching πR, half
 the circumference) a small error is often not a major
 concern in this unusual case (although there are other
 great-circle distance formulas that avoid this
 problem). (The formula above is sometimes written in
 terms of the arctangent function, but this suffers
 from similar numerical problems near h = 1.)

 As described below, a similar formula can be written
 using cosines (sometimes called the spherical law of
 cosines, not to be confused with the law of cosines
 for plane geometry) instead of haversines, but if the
 two points are close together (e.g. a kilometer apart,
 on the Earth) you might end up with cos (d/R) =
 0.99999999, leading to an inaccurate answer. Since the
 haversine formula uses sines it avoids that problem."

-- 
underground experts united:
http://user.it.uu.se/~embe8573


reply via email to

[Prev in Thread] Current Thread [Next in Thread]