tanh

Math.tanh() â float Class Public methods Computes the hyperbolic tangent of x (expressed in radians).

tan

Math.tan(x) â float Class Public methods Returns the tangent of x (expressed in radians).

sqrt

sqrt(a) Class Public methods Computes the square root of a. It makes use of Complex and Rational to have no rounding errors if possible. Math.sqrt(4/9) # => 2/3 Math.sqrt(- 4/9) # => Complex(0, 2/3) Math.sqrt(4.0/9.0) # => 0.666666666666667

sinh

Math.sinh(x) â float Class Public methods Computes the hyperbolic sine of x (expressed in radians).

sin

Math.sin(x) â float Class Public methods Computes the sine of x (expressed in radians). Returns -1..1.

rsqrt

rsqrt(a) Class Public methods Compute square root of a non negative number. This method is internally used by Math.sqrt.

log2

Math.log2(numeric) â float Class Public methods Returns the base 2 logarithm of numeric. Math.log2(1) #=> 0.0 Math.log2(2) #=> 1.0 Math.log2(32768) #=> 15.0 Math.log2(65536) #=> 16.0

log10

Math.log10(numeric) â float Class Public methods Returns the base 10 logarithm of numeric. Math.log10(1) #=> 0.0 Math.log10(10) #=> 1.0 Math.log10(10**100) #=> 100.0

log

Math.log(numeric) â floatMath.log(num,base) â float Class Public methods Returns the natural logarithm of numeric. If additional second argument is given, it will be the base of logarithm. Math.log(1) #=> 0.0 Math.log(Math::E) #=> 1.0 Math.log(Math::E**3) #=> 3.0 Math.log(12,3) #=> 2.2618595071429146

lgamma

Math.lgamma(x) â [float, -1 or 1] Class Public methods Calculates the logarithmic gamma of x and the sign of gamma of x. ::lgamma is same as [Math.log(Math.gamma(x).abs), Math.gamma(x) < 0 ? -1 : 1] but avoid overflow by ::gamma for large x.