The operation of rounding down is called the lower limit, which is expressed by mathematical symbols, and the operation of rounding up is called the upper limit, which is expressed by mathematical symbols.
The integer operation defined by C language is neither the lower limit nor the upper limit. No matter whether the operand is negative or not, the decimal part is always truncated, so when the operand is positive, it is equivalent to Floor, and when the operand is negative, it is equivalent to Ceiling.
Extended data
The largest integer whose integer function does not exceed the real number x is called the integer part of x, and it is recorded as [x] or INT(x).
Closely related to the integer part is its fractional part, which is recorded as {x} and defined as {x} =x-[x]. by[x]+ 1 >; X≥[x] is not difficult to know1>; {x}≥0, otherwise, if x=[x], naturally {x}=0. These simple facts are sometimes very useful. For a given, {x} is required, just find [x] first.
(It should be noted that for negative numbers, [x] does not refer to the left part of X decimal point, and {x} does not refer to the right part of X decimal point. For example, for negative numbers, [-3.7] =-4 instead of -3, {x}=-3.7-(-4)=0.3 instead of -0. )
Integer function (Gaussian function) is irreducible, that is, for any x 1, x2∈R, if x 1≤x2, then [x 1]≤[x2].