max

Computes the maximum of a pair or array of integer or floating-point expressions.

Syntax


floatExpr max(floatExprArray a)
floatExpr max(floatExpr x, floatExpr y)
intExpr max(intExprArray a)
intExpr max(intExpr x, intExpr y)

Parameters

  • a: An array of integer or floating-point expressions from which the maximum is to be computed.
  • x: First integer or floating-point expressions from which the maximum is to be computed.
  • y: Second integer or floating-point expressions from which the maximum is to be computed.

Description

The max function returns an expression which has the same value as the maximum of the supplied arguments. The return type corresponds to the type of arguments supplied.

Example


m = min(max(a,b), max(min(a, b), c))

This computes the median m of three expressions a, b, and c.

Requirements

  • If the a array has no elements, the max function returns negative infinity.