This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Haversine

Haversine[z]
gives the haversine function .
  • Mathematical function, suitable for both symbolic and numerical manipulation.
  • The haversine function is defined by .
  • The argument of haversine is assumed to be in radians. (Multiply by Degree to convert from degrees.)
  • Haversine[z] is the entire function of z with no branch cut discontinuities.
  • Haversine can be evaluated to arbitrary numerical precision.
Evaluate numerically:
Evaluate for complex arguments:
Evaluate to arbitrary precision:
The precision of the output tracks the precision of the input:
Evaluate exactly:
Haversine threads element-wise over lists:
TraditionalForm formatting:
Haversine can be applied to a power series:
Distance between two points on a sphere:
Distance between two cities in kilometers (assuming spherical Earth):
Derivative of haversine function:
Integral of haversine function:
Use FunctionExpand to expand Haversine in terms of standard trigonometric functions:
New in 7