  We analyze an algorithm for computing a skew-Hermitian logarithm of a unitary
matrix. This algorithm is very easy to implement using standard software and it
works well even for unitary matrices with no spectral conditions assumed.
Certain examples, with many eigenvalues near -1, lead to very non-Hermitian
output for other basic methods of calculating matrix logarithms. Altering the
output of these algorithms to force an Hermitian output creates accuracy issues
which are avoided in the considered algorithm.
  A modification is introduced to deal properly with the $J$-skew symmetric
unitary matrices. Applications to numerical studies of topological insulators
in two symmetry classes are discussed.
