ceilmax2
ceilmax2 is a mathematical function that returns the smallest integer greater than or equal to the maximum of two input real numbers. Formally, ceilmax2(a, b) = ceil(max(a, b)).
A useful equivalent form is ceilmax2(a, b) = max(ceil(a), ceil(b)) for all real a and b. This follows
Key properties include commutativity, since ceilmax2(a, b) = ceilmax2(b, a), and its behavior for integers: if a
In computation, ceilmax2 can be implemented directly as ceil(max(a, b)) in most languages. An equivalent expression
Examples: ceilmax2(3.2, 4.7) = ceil(4.7) = 5. ceilmax2(-1.1, -2.9) = ceil(-1.1) = -1. If a = 2 and b = 5, ceilmax2(2,
Extensions of the concept include ceilmax_n for n inputs, defined as ceil(max(x1, x2, ..., xn)).
See also: ceiling function, maximum function, integer rounding.