Home Online Manual
Top
Back: lusolve
Forward: maxideal
FastBack: Functions and system variables
FastForward: Control structures
Up: Functions
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

5.1.82 max

Procedure from library standard.lib (see standard_lib).

Syntax:
max (i_1, ..., i_k)

Type:
same as type of i_1, ..., i_k resp.

Purpose:
returns the maximum for any arguments of a type
for which '>' is defined

Example:
 
  // biggest int
max(2,3);
==> 3
max(1,4,3);
==> 4
// lexicographically biggest intvec
max(intvec(1,2),intvec(0,1),intvec(1,1));
==> 1,2
// polynopmial with biggest leading monomial
ring r = 0,x,dp;
max(x+1,x2+x);
==> x2+x
See also: min.