exp(z)
Math::E raised to the z power
CMath.exp(2i) #=> (-0.4161468365471424+0.9092974268256817i)
# File lib/cmath.rb, line 61 def exp(z) begin if z.real? exp!(z) else ere = exp!(z.real) Complex(ere * cos!(z.imag), ere * sin!(z.imag)) end rescue NoMethodError handle_no_method_error end end