Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

BigMath#E

E(numeric) → BigDecimal

Computes e (the base of natural logarithms) to the specified number of digits of precision, numeric.

Example
BigMath.E(10).to_s
#=> "0.271828182845904523536028752390026306410273e1"
See also #cos #PI #atan #sin also in 3.3 · 3.2 · 3.1