Fix evaluation of reciprocal trigonometric functions in even quadrants

fixes #8421