On the computation of the cosine measure in high dimensions