# 指数関数と対数関数

このセクションでは、指数および対数の計算に関連する関数について説明します。すべての関数は、データ ロード スクリプトおよびチャートの数式の両方で使用できます。

次の関数では、パラメータは数式であり、x と y は実際の数値と解釈されます。

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/ExponentialAndLogarithmicFunctions/exponential-logarithmic-functions.htm)

#### exp

自然対数の底 e を底として使用する自然指数関数 e^x。結果は正の数値です。

exp(x )

例と結果:

`exp(3)` は、20.085 を返します。

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/ExponentialAndLogarithmicFunctions/exponential-logarithmic-functions.htm)

#### log

x の自然対数。関数は、x&gt; 0 の場合にのみ定義されます。結果は数値で返されます。

log(x )

例と結果:

`log(3)` は、1.0986 を返します

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/ExponentialAndLogarithmicFunctions/exponential-logarithmic-functions.htm)

#### log10

x の常用対数 (10 を底とする対数) です。関数は、x&gt; 0 の場合にのみ定義されます。結果は数値で返されます。

log10(x )

例と結果:

`log10(3)` は、0.4771 を返します

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/ExponentialAndLogarithmicFunctions/exponential-logarithmic-functions.htm)

#### pow

x の y 乗を返します。結果は数値で返されます。

pow(x,y )

例と結果:

`pow(3, 3)` は、27 を返します

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/ExponentialAndLogarithmicFunctions/exponential-logarithmic-functions.htm)

#### sqr

x の 2 乗 (x の 2 のべき乗)。結果は数値で返されます。

sqr (x )

例と結果:

`sqr(3)` は、9 を返します

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/ExponentialAndLogarithmicFunctions/exponential-logarithmic-functions.htm)

#### sqrt

x の平方根です。関数は、x &gt;= 0 の場合にのみ定義されます。結果は正の数値です。

sqrt(x )

例と結果:

`sqrt(3)` は、1.732 を返します