Function reference · Math

heaviside

Computes the Heaviside step function.

Nerdamer uses the half-maximum convention: the result is 0 for negative inputs, 1/2 at zero, and 1 for positive inputs. Symbolic inputs remain as heaviside(x) unless assumptions determine their sign.

Examples

These examples use Nerdamer Notation.

Evaluate a negative argument.

heaviside(-2)
// → 0

Use the half-maximum value at zero.

heaviside(0)
// → 1/2

Evaluate a positive argument.

heaviside(3)
// → 1

Interfaces

The same operation is available through the interfaces below.

Nerdamer Notation · nerdamer API

Nerdamer Notation

Use this form inside input passed to nerdamer(...).

heaviside(arg1)

nerdamer.heaviside

Call the operation through the default nerdamer import.

nerdamer.heaviside(x: Expression): Expression

Parameters

NameTypeDescription
xExpressionThe input expression.

Returns

Expression — The Heaviside step value.

Browse the nerdamer API →

← Back to Reference