However, this approach is numerically unstable. The version provided here is
numerically stable and based on the Angle Between Vectors
Julia package by Jeffrey Sarnoff (MIT license), implementing an algorithm
provided by Prof. W. Kahan in
these notes
(see page 15).