fixed cosine calc