Since the sine and cosine return values in the range [-1, 1], I'd suggest that you use the absolute, rather than the relative, error. By replacing
correct = fabs(get_user_input(is_cos, angle)/right - 1.) <= ACCURACY;
with
correct = fabs(get_user_input(is_cos, angle) - right) <= ACCURACY;
everything should work as expected.
Generally I tend to use relative errors for large values and absolute errors for small values. You can combine both with
fabs(a-b)/(1.0+min(fabs(a), fabs(b)))
which (assuming you have a reasonable definition of min
) tends to the relative error for large values and to the absolute error for small ones.