Function reference · Math

max

Returns the greatest value when the arguments can be ordered.

Numeric and otherwise comparable arguments are reduced to the maximum. If Nerdamer cannot establish an ordering between symbolic arguments, the unresolved part remains symbolic.

Available assumptions can help determine ordering for symbolic values.

Examples

These examples use Nerdamer Notation.

Select the largest numeric argument.

max(2,5,-1)
// → 5

Keep unresolved symbolic ordering explicit.

max(x,y)

Interfaces

The same operation is available through the interfaces below.

Nerdamer Notation · nerdamer API

Nerdamer Notation

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

max(arg1, arg2, ...)

nerdamer.max

Call the operation through the default nerdamer import.

nerdamer.max(...args: ExpressionInput[]): Expression

Parameters

NameTypeDescription
argsExpressionInput[]Two or more expressions to compare.

Returns

Expression — The maximum value, or a symbolic `max(...)` node.

Browse the nerdamer API →

← Back to Reference