This is apples vs. oranges. In most languages/APIs, min/max take two (or more) inputs, and return the smallest/biggest. floor/ceil take one argument, and round it down or up to the nearest integer.
Videos
What is the difference between ceiling function and floor function?
Give examples of floor and ceiling functions.
What does the floor function do?
This is apples vs. oranges. In most languages/APIs, min/max take two (or more) inputs, and return the smallest/biggest. floor/ceil take one argument, and round it down or up to the nearest integer.
This is apples vs. oranges. In most languages/APIs, min/max take two (or more) inputs, and return the smallest/biggest. floor/ceil take one argument, and round it down or up to the nearest integer.
To my knowledge max and min are used on a collection, say an array of numbers. Floor and ceiling are used for single numbers. For example:
min(1, 2, 3, 4) => 1
max(1, 2, 3, 4) => 4
floor(3.5) => 3
ceiling(3.5) => 4
Simply put it's two ways of thinking of rounding off a number. Ceiling rounds up to nearest integer. Floor rounds down to nearest integer. If the number is an integer, nothing happens.
It's easy to think about floor and ceil from the perspective of the number line.
Let's say you have some decimal number, (I'm going to be using this number as an example throughout my answer)

So, as you can see, the functions just return the nearest integer values.
floor returns the nearest lowest integer and ceil returns the nearest highest integer.
All real numbers are made of a characteristic (an integer part) and mantissa (a fractional part)
When floor a number, you can think of it as replacing the Mantissa with
and ceil can be thought of as replacing the mantissa with .
That's not a very popular way of thinking about it but it was the way I thought about it when I first started using it in programming.
Remember, the number remains the same when it is an integer.
ie, floor()
ceil(
)
Let's now look at the proper definitions along with the graphs for them.
Floor Function: Returns the greatest integer that is less than or equal to

Ceiling Function: Returns the least integer that is greater than or equal to

Don't let the infinite staircase scare you. It's much more simpler than it seems. Those "line-segments" that you see are actually called piecewise-step functions.
Simply, the black dot represents 'including this number' and the white represents 'excluding this number'. Meaning that each segment actually is from x to all numbers less than x+1.
Let's look at 2.31 and how it would look on both the graphs at once.
You can see that the line When I truncate a number what my brain actually does is ignoring the fractional part of said number. But its not doing any real math.
I understand I can express a truncate function with conditional floor and cealing functions... but thats is not what I need.
I need someone to teach me how to arrive from a number to its integer using only mathematical operations and not logical functions.
I need to know...
Plz help me someone...
To add to Hyperboreus' answer, this is strictly speaking not an ABAP question, as the ceiling and floor functions are generic mathematical functions included in other languages too.
You can try it for yourself with the following ABAP code to get a hands-on understanding:
data: v type p decimals 1.
data: c type i.
data: f type i.
v = '8.2'.
c = ceil( v ).
f = floor( v ).
write: c, f.
Unfortunatly I do not know a thing about abap, but ceil and floot are generally defined as follows:
The floor of a float value is the next lowest integer.
The ceiling of a float value is the next highest integer.
Exempli gratia:
ceil (4.1) = 5
floor (4.1) = 4