cos(z)
returns the cosine of z, where z is given in radians
# File lib/cmath.rb, line 170 def cos(z) begin if z.real? cos!(z) else Complex(cos!(z.real) * cosh!(z.imag), -sin!(z.real) * sinh!(z.imag)) end rescue NoMethodError handle_no_method_error end end