Computes the tangent function.