mathematical functions
Provides mathematical functions.
Example:
require
"bigdecimal"
"bigdecimal/math"
include BigMath
a = BigDecimal((
PI
(
100
)/
2
).to_s)
puts sin(a,
)
# -> 0.10000000000000000000......E1
sqrt(x,prec) Instance Public methods Computes the square root of x to the specified
sin(x, prec) Instance Public methods Computes the sine of x to the specified
BigMath.log(x, prec) Class Public methods Computes the natural logarithm of
PI(prec) Instance Public methods Computes the value of pi to the specified number
atan(x, prec) Instance Public methods Computes the arctangent of x to the specified
cos(x, prec) Instance Public methods Computes the cosine of x to the specified
E(prec) Instance Public methods Computes e (the base of natural logarithms)
BigMath.exp(x, prec) Class Public methods Computes the value of e (the base