Suppress invalid value warnings for cosine computations.