sin(z)
Returns the sine of z, where z is given in radians
CMath.sin(1 + 1i) #=> (1.2984575814159773+0.6349639147847361i)
# File lib/cmath.rb, line 165 def sin(z) begin if z.real? RealMath.sin(z) else Complex(RealMath.sin(z.real) * RealMath.cosh(z.imag), RealMath.cos(z.real) * RealMath.sinh(z.imag)) end rescue NoMethodError handle_no_method_error end end