Function reference · Math

max

Returns the largest of its arguments.

Numbers, and symbols that assumptions let it compare, are reduced. If it can't order all the arguments, the call is returned unevaluated.

Notation

max(arg1, arg2, ...)

Write it in an expression: nerdamer('max(2,5,-1)'), or in the Playground.

nerdamer.max

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

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

Examples

The largest number.

max(2,5,-1)
// → 5
Open in Playground

With assumptions, x is larger.

assume(x>0); assume(y<0); max(x,y)
// → x
Open in Playground

x can't be compared: unevaluated.

max(x,2,5)
// → max(x, 2, 5)
Open in Playground

← Back to Function reference