> For the complete documentation index, see [llms.txt](https://docs.e6data.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.e6data.com/product-documentation/sql-command-reference/mathematical-functions-and-operators/exponential-and-root-functions.md).

# Exponential and Root Functions

#### <mark style="color:purple;">POWER(</mark>  \<expr1>,   \<expr2>  <mark style="color:purple;">)</mark> &#x20;

Returns the value of  `expr1` raised to the power of `expr2.`

```sql
> select power(3.15, 0.5);
1.775
```

#### <mark style="color:purple;">FACTORIAL(</mark>  \<expr><mark style="color:purple;">)</mark> &#x20;

Computes the factorial of its input

Supported  datatype: Integer

```sql
> select factorial(5);
120
```

**NOTE** - The input must be an integer expression within the inclusive range of 0 to 20.

#### <mark style="color:purple;">CBRT(</mark>  \<expr>  <mark style="color:purple;">)</mark> &#x20;

Calculates the cubic root of a numerical value.

Support datatype: Integer, Double

```sql
> select cbrt(125);
5
> select cbrt(5);
1.709975946676697
```

#### <mark style="color:purple;">SQRT(</mark>  \<expr>  <mark style="color:purple;">)</mark> &#x20;

Calculates the square root of a numerical value.

Support datatype: Integer, Double

```sql
> select sqrt(4);
2
> select sqrt(-1);
nan
```

#### <mark style="color:purple;">EXP(</mark>  \<expr>  <mark style="color:purple;">)</mark> &#x20;

Calculates the exponential function of a floating-point value, with Euler's number e as the base

Support datatype: Integer, Double

```sql
> select exp(1);
2.7182818284590455
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.e6data.com/product-documentation/sql-command-reference/mathematical-functions-and-operators/exponential-and-root-functions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
