tan(z)
returns the tangent of z, where z is given in radians
CMath.tan(1 + 1i) #=> (0.27175258531951174+1.0839233273386943i)
# File lib/cmath.rb, line 206 def tan(z) begin if z.real? tan!(z) else sin(z) / cos(z) end rescue NoMethodError handle_no_method_error end end