# 对数与根式

### 平方根和立方根

| Function | Name        | Behaviour               |
| -------- | ----------- | ----------------------- |
| sqrt()   | Square Root | 返回一个数的平方根（也即 $\sqrt{}$） |
| cbrt()   | Cube Root   | 返回一个数的立方根               |

```
sqrt(16)          | 4
cbrt(343)         | 7

square root of 81 | 9
cube root of 27   | 3
```

### N次方根

```
root 5 of 100 | 2.5118864315
```

### 对数

| Function       | Name              | Behaviour                                     |
| -------------- | ----------------- | --------------------------------------------- |
| exp()          | Exponential       | 计算 $e$ 的 $x$ 次方，其中 $e$ 是自然对数的底数。exp(1) 返回欧拉数。 |
| ln()           | Natural logarithm | 一个数的自然对数是其以数学常数 $e$ 为底的对数。                    |
| log2()         | Base 2 logarithm  | 计算一个值的以 2 为底的对数                               |
| log(), log10() | Base 10 logarithm | 计算一个值的以 10 为底的对数                              |

### 任意底数的对数

```
log 20 base 4 | 2.1609640474
```

您也可以使用更自然的短语来表示此操作：

```
81 is 9 to what power | 2
27 is 3 to the what power | 3
```

### 阶乘和绝对值

| Function | Name           | Behaviour           |
| -------- | -------------- | ------------------- |
| abs()    | Absolute value | 返回一个数的绝对值（即使负数变为正数） |
| fact()   | Factorial      | 返回给定数的阶乘。           |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.soulver.app/zh/yu-fa-can-kao/general/logarithms-and-roots.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
