Hyperbolic distance in the Poincare half-plane (source code)

= Hyperbolic distance in the Poincare half-plane
{c}

For $z,w$ in the upper half-plane,
$$
\cosh d(z,w)=1+\frac{|z-w|^2}{2\operatorname{Im}z\operatorname{Im}w}.
$$