instance method BigMath#E
E(prec) -> BigDecimal
-
自然対数の底 e を prec で指定した精度で計算します。
- [PARAM] prec:
- 計算結果の精度。
- [EXCEPTION] ArgumentError:
- prec に 0 以下が指定された場合に発生します。
例:
require "bigdecimal" require "bigdecimal/math" include BigMath puts E(10) #=> 0.271828182845904523536028752390026306410273E1
module BigMath