max2
Max2 is a term used in mathematics and computer science to denote the binary maximum operation: a function that takes two inputs and returns the greater of the two. It is often contrasted with the general notion of a maximum over a set or with n-ary versions that accept more than two arguments. In formal contexts, max2 serves as a precise two-argument primitive from which larger maximums can be built by chaining calls.
In programming and numerical computing, max2 is typically implemented as a simple comparison: given inputs a
Examples illustrate its use: max2(3, 7) equals 7, and max2(-4, -9) equals -4. In floating point contexts,
Max2 is not universally a standard named function across languages; many systems simply provide a two-argument