Evaluating the composition of sine and cosine functions