Fixes tan for small values of argument (followup to #2889)