Skip to content
ffredyk edited this page Jul 23, 2026 · 1 revision

exp

Category

Math

Arity

Unaryexp <number>.

exp <number>

Description

Returns e (Euler's number, ~2.71828) raised to the given power. This is the natural exponential function. exp x = e^x. Auto-unwraps shared values.

How It Works

Calls Math.Exp(double). The inverse of log.

Usage

exp 0;                         // 1
exp 1;                         // 2.71828...
exp 2;                         // 7.389...

// Compound continuous growth
_growth = _principal * exp (_rate * _time);

// Logistic / sigmoid
_sigmoid = 1 / (1 + exp (-_x));

// Softmax helper
_sumExp = 0;
{ _sumExp = _sumExp + exp _x } forEach _values;

Thread Safety

ReadOnly — pure computation. Safe from any scheduler.

See Also

  • log — natural logarithm (inverse)
  • ^ — general power
  • pow — power command form

SQ# Wiki

Home

Engine Docs

Migration

Commands

Value Constructors

Arithmetic

Comparison

Logic

Array

String

Math

Random

Type & Introspection

HashMap

Code Execution

Concurrency

Scheduler

Thread Safety

Error

Output

Time

Multiplayer

Compiler

Clone this wiki locally