EXP

EXP(value)[source]

Computes the exponential (e^x) of a given number or numeric array.

This function calculates the natural exponential of a given number or array of numbers. If an array of numbers is provided, the exponential is calculated for each element individually. If the input is blank or in an error state, the formula will evaluate to an error.

Parameters:

value (int | float | Operand) –

The numeric input to exponentiate.

Supported types:

  • INTEGER

  • DECIMAL

  • INTEGER_ARRAY

  • DECIMAL_ARRAY

Return type:

Formula

Returns:

A Formula object representing the computed exponential.

Supported types:

  • DECIMAL

  • DECIMAL_ARRAY

Raises:

ValueError – If value is not a numeric type or a numeric array.

Examples

Basic usage with a scalar:

EXP(1)
# Returns 2.718281828459045 (approximately)

Usage with a model object:

EXP(my_numeric_field)
# Returns a formula representing the natural exponentation of `my_numeric_field`)`

Usage with an array:

EXP([1, 2, 3])
# Returns [2.718, 7.389, 20.085] approximately