> ## Documentation Index
> Fetch the complete documentation index at: https://firebolt-aggregate-operator-docs-pr-59.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Reference material for EXP function

# EXP

Returns the value of the constant *e* raised to the power of the specified number.

## Syntax

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
EXP(<value>)
```

## Parameters

| Parameter | Description                   | Supported input types                                               |
| :-------- | :---------------------------- | :------------------------------------------------------------------ |
| `<value>` | The exponent to raise *e* to. | `DOUBLE PRECISION` (implicit cast from `INTEGER`, `BIGINT`, `REAL`) |

## Return Type

`DOUBLE PRECISION`

## Remarks

* `EXP(NULL)` returns `NULL`.
* `EXP('NaN')` returns `NaN`.
* `EXP('Infinity')` returns `Infinity`.
* `EXP('-Infinity')` returns `0`.
* If the result would overflow or underflow the `DOUBLE PRECISION` range, an error is raised. To check whether a value is finite before calling `EXP`, use [`IS_FINITE`](/reference-sql/functions-reference/numeric/is_finite).
* `NUMERIC` arguments are not accepted; cast them explicitly to `DOUBLE PRECISION` first.

## Example

The following example raises *e* to the power of `2`:

<div className="query-window">
  ```
  SELECT EXP(2);
  ```

  | exp <span>double</span> |
  | :---------------------- |
  | 7.38905609893065        |

  <p><span>Rows: 1</span><span>Execution time: 2.19ms</span></p>
</div>

The following example shows special value handling:

<div className="query-window">
  ```
  SELECT EXP('infinity'::DOUBLE PRECISION) AS pos_inf, EXP('-infinity'::DOUBLE PRECISION) AS neg_inf;
  ```

  | pos\_inf <span>double</span> | neg\_inf <span>double</span> |
  | :--------------------------- | :--------------------------- |
  | inf                          | 0                            |

  <p><span>Rows: 1</span><span>Execution time: 4ms</span></p>
</div>
