# PowerApps 中的 Abs、Exp、Ln、Power 和 Sqrt 函数Abs, Exp, Ln, Power, and Sqrt functions in PowerApps

## 说明Description

Abs 函数返回参数的非负值。The Abs function returns the non-negative value of its argument. Abs 返回负数的绝对值。If a number is negative, Abs returns the positive equivalent.

Exp 函数返回 e 的参数次方值。The Exp function returns e raised to the power of its argument. 超越数 e 的一次方值为 2.7182818...The transcendental number e begins 2.7182818...

Ln 函数返回参数的自然对数（以 e 为底）。The Ln function returns the natural logarithm (base e) of its argument.

Power 函数返回数字的次方值。The Power function returns a number raised to a power. 相当于使用 ^ 运算符It is equivalent to using the ^ operator.

Sqrt 函数返回参数的平方根。The Sqrt function returns the number that, when multiplied by itself, equals its argument.

## 语法Syntax

Abs( Number )Abs( Number )
Exp( Number )Exp( Number )
Ln( Number )Ln( Number )
Sqrt( Number )Sqrt( Number )

• Number - 必需。Number - Required. 要计算的数字。Number to operate on.

Power( Base, Exponent )Power( Base, Exponent )

• Base - 必需。Base - Required. 计算次方值时的底数。Base number to raise.
• Exponent - 必需。Exponent - Required. 计算底数次方值时的指数。The exponent to which the base number is raised.

Abs( SingleColumnTable )Abs( SingleColumnTable )
Exp( SingleColumnTable )Exp( SingleColumnTable )
Ln( SingleColumnTable )Ln( SingleColumnTable )
Sqrt( SingleColumnTable )Sqrt( SingleColumnTable )

• SingleColumnTable - 必需。SingleColumnTable - Required. 要计算的单列表数字。A single-column table of numbers to operate on.

## 示例Examples

### 单个数字Single number

Abs( -55 )Abs( -55 ) 返回不带负号的数字。Returns the number without the negative sign. 5555
Exp( 2 )Exp( 2 ) 返回 e 的 2 次方值，或 e \* e 结果值。Returns e raised to the power of 2, or e \* e. 7.389056...7.389056...
Ln( 100 )Ln( 100 ) 返回数字 100 的自然对数（以 e 为底）。Returns the natural logarithm (base e) of the number 100. 4.605170...4.605170...
Power( 5, 3 )Power( 5, 3 ) 返回 5 的 3 次方值 ，或 5 * 5 * 5 结果值。Returns 5 raised to the power of 3, or 5 * 5 * 5. 125125
Sqrt( 9 )Sqrt( 9 ) 返回 9 的平方根。Returns the number that, when multiplied by itself, results in 9. 33

### 单列表Single-column table

Abs( ValueTable )Abs( ValueTable ) 返回表中每个数字的绝对值。Returns the absolute value of each number in the table.
Exp( ValueTable )Exp( ValueTable ) 返回 e 的表中每个数字次方值。Returns e raised to the power of each number in the table.
Ln( ValueTable )Ln( ValueTable ) 返回表中每个数字的自然对数。Returns the natural logarithm of each number in the table.
Sqrt( ValueTable )Sqrt( ValueTable ) 返回表中每个数字的平方根。Returns the square root of each number in the table

### 分步示例Step-by-step example

1. 添加“文本输入”控件，然后将其命名为“Source”。Add a Text input control, and name it Source.
2. 添加一个“标签”控件，然后将“Text”属性设置为以下公式：Add a Label control, and set its Text property to this formula:
Sqrt( Value( Source.Text ) )Sqrt( Value( Source.Text ) )
3. 在“源”中键入数字，然后确认“标签”控件中是否显示所键入数字的平方根。Type a number into Source, and confirm that the Label control shows the square root of the number that you typed.