module function BigMath.#exp
exp(x, prec) -> BigDecimal
-
x の指数関数を prec で指定した精度で計算します。 x に無限大や NaN を指定した場合には NaN を返します。
- [PARAM] x:
- 計算対象の BigDecimal オブジェクト。
- [PARAM] prec:
- 計算結果の精度。
- [EXCEPTION] ArgumentError:
- prec に 0 以下が指定された場合に発生します。
例:
require "bigdecimal/math" puts BigMath::exp(BigDecimal.new('1'), 10) #=> 0.2718281828E1
module BigMath