Function reference · Math

step

Computes the legacy unit step function.

step(x) returns 0 for resolved negative inputs and 1 for resolved inputs greater than or equal to zero. Symbolic inputs remain as step(x).

Unlike heaviside(x), step(0) is 1 rather than 1/2.

Examples

These examples use Nerdamer Notation.

Return zero for a negative input.

step(-3)
// → 0

Use the legacy value at the origin.

step(0)
// → 1

Return one for a positive input.

step(3)
// → 1

Keep an unresolved symbolic input unevaluated.

step(x)
// → step(x)

Interfaces

The same operation is available through the interfaces below.

Nerdamer Notation · nerdamer API

Nerdamer Notation

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

step(arg1)

nerdamer.step

Call the operation through the default nerdamer import.

nerdamer.step(x: ExpressionInput): Expression

Parameters

NameTypeDescription
xExpressionInput—

Returns

Expression

Browse the nerdamer API →

← Back to Function reference