> 
> In fact, when Sinnott published the
>  haversine formula, computational
>  precision was limited. Nowadays,
>  JavaScript (and most modern computers
>  & languages) use IEEE 754 64-bit
>  floating-point numbers, which provide
>  15 significant figures of precision.
>  With this precision, the simple
>  *spherical law of cosines* formula (`cos
>  c = cos a cos b + sin a sin b cos C`)
>  gives well-conditioned results down to
>  distances as small as around 1 metre.
>  ***In view of this it is probably worth,
>  in most situations, using either the
>  simpler law of cosines or the more
>  accurate ellipsoidal Vincenty formula
>  in preference to haversine!*** (bearing
>  in mind notes below on the limitations
>  in accuracy of the spherical model).  
> 
>  Source: <http://www.movable-type.co.uk/scripts/latlong.html>
> 
> 
> 

What is the reason why law of cosines is more preferable?

**Note:** The quoted text has been updated by [its author](https://gis.stackexchange.com/users/2852/chrisv) as mentioned [below](https://gis.stackexchange.com/questions/4906/why-is-law-of-cosines-more-preferable-than-haversine-when-calculating-distance-b/9197#comment11102_4906).