Function reference · Math

step

Returns the unit step: 0 for negative values and 1 for zero and positive ones.

Unlike heaviside, step(0) is 1, not 1/2, as in Nerdamer 1.x. For a symbol, the call is returned unevaluated.

Notation

step(x)

Write it in an expression: nerdamer('step(-3)'), or in the Playground.

nerdamer.step

nerdamer.step(x: ExpressionInput): Expression

A method on the default import. Arguments can be strings, as in Notation.

Examples

Negative.

step(-3)
// → 0
Open in Playground

Zero gives 1.

step(0)
// → 1
Open in Playground

Positive.

step(3)
// → 1
Open in Playground

A symbol: unevaluated.

step(x)
// → step(x)
Open in Playground

← Back to Function reference