evaluate trigonometric functions