A simple solver for trigonometric equations.