evaluating trigonometric functions