Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new tab

For information on migrating to InterSystems IRISOpens in a new tab, see Why Migrate to InterSystems IRIS?

Exp

(自然対数の底である) e をべき乗した値を返します。

Synopsis

Exp(number)

引数

引数 number は、任意の有効な数値式です。Windows システムでは、number の値が 335 を超える場合、実行時エラーが発生します。number の値が -295 未満の場合、Exp はゼロ (0) を返します。

概要

Exp 関数は、自然対数の定数である e を取り、number 引数で指定された値のべき乗を求めます。定数 e (Exp(1)) は約 2.718282 です。

Exp 関数は、Log 関数のアクションを補完するものであり、逆対数とも呼ばれます。

ObjectScript の対応する関数は、$ZEXP です。

以下の例は、Exp 関数を使用して、-10 から 10 までの各整数について、e のべき乗値を求めます。

For x = -10 To 10
Println "Natural log of ",x," = ",Exp(x)
Next

以下の例は、Exp 関数を使用して、角度の双曲線サインを返します。

Dim MyAngle, MyHSin  ' Define angle in radians.
MyAngle = 1.3        ' Calculate hyperbolic sine.
MyHSin = (Exp(MyAngle) - Exp(-1 * MyAngle)) / 2
Println MyHSin

関連項目

FeedbackOpens in a new tab