Rewrote this, but left in a comment that the result is still equal to `(n_squared - 1.0) / (2.0 * n_squared)`.