Back to functions

max


maximum

Returns the maximum of a set of numbers. Maps directly to Math.max(... args) if numeric.

Usage: nerdamer("max(... args)")


Parameters

expression args A variable number of arguments

Returns

Expression

EXAMPLES:
var x = nerdamer('max(5, 2, 11)').evaluate();
console.log(x.toString());
x = nerdamer('max(x*x, y, z)');
console.log(x.toString());
//Instruct nerdamer to return symbolic min and max
nerdamer.set('SYMBOLIC_MIN_MAX', true);
x = nerdamer('max(sqrt(2), pi)');
console.log(x.toString());
OUTPUT:
Back to functions