CMath is a library that provides trigonometric and transcendental functions for complex numbers.
To start using this library, simply:
require "cmath"
Square root of a negative number is a complex number.
CMath.sqrt(-9) #=> 0+3.0i
asin!(z) Class Public methods Alias for:
atan2!(y,x) Class Public methods Alias for:
atanh(z) Class Public methods returns the inverse hyperbolic tangent of z
cos!(z) Class Public methods Alias for:
cos(z) Class Public methods returns the cosine of z, where z
cbrt!(z) Class Public methods Alias for:
sinh(z) Class Public methods returns the hyperbolic sine of z,
acos!(z) Class Public methods Alias for:
atan(z) Class Public methods returns the arc tangent of z
sin(z) Class Public methods returns the sine of z, where z
Page 2 of 4