In the field of Mathematics and Computer Programming, floor function and ceiling function are the two important functions used quite often. As an example of the floor and ceiling functions, the floor and ceiling of a decimal 4.41 will be 4 and 5 respectively.Â Â
So using these two functions, we are able to obtain the nearest integer in a number line of an assigned decimal. Here, we will discuss the function floor ceiling definition, notation, graphs, symbols, properties, and examples.
The ceiling math Function is classified under Trigonometry functions and Excel Math. Floor ceil enables returning a number that is rounded up to the closest enough integer or multiple of significance. The ceiling function was first introduced in MS Excel 2013.
It is a function where the smallest successive integer is returned successfully. This is to say; the ceiling function of a real number â€˜pâ€™ is the least integer that is greater than or equals to (â‰¥) the given number â€˜pâ€™. Mathematically, the ceiling function is thus described as:
F (x) = minimum {a âˆˆ Z ; a â‰¥ p }
The ceiling function is also referred to as the smallest integer function. The notation used to denote the function of floor ceil is âŒˆ âŒ‰. It can be used as âŒˆxâŒ‰, ceil (x) or f(x) = âŒˆxâŒ‰
The symbol of the function floor ceiling is also a kind of square bracket. i.e.âŒŠ âŒ‹.
Let us take into account that p and q are two real numbers and ceil (x) = âŒˆxâŒ‰. Some of the essential properties of the function floor ceiling are as follows:
âŒˆpâŒ‰ + âŒˆqâŒ‰ â€“ 1 â‰¤ âŒˆp + qâŒ‰ â‰¤ âŒˆpâŒ‰ + âŒˆqâŒ‰
âŒˆp + aâŒ‰ = âŒˆpâŒ‰ + a
âŒˆpâŒ‰ = a; iff x â‰¤ p < p + 1
âŒˆpâŒ‰ = a; iff p â€“ 1 < a â‰¤ p
a < âŒˆpâŒ‰ iff a < p
a â‰¤ âŒˆpâŒ‰ iff p < a
The formula used to find the ceiling value for any given value is:
f (x) = minimum { a âˆˆ Z ; a â‰¥ x }
It is denoted by:
F(x) = âŒˆxâŒ‰ = Smallest Closest Successive Integer of specified value
Letâ€™s undertake a ceiling function example to understand the concept better.
Example: Determine the ceiling value of 4.8.
Solution:
Given, x = 4.8
As we can notice, the integers greater than 4.8, are 5, 6,7,8,9...and so on.
The closest enough integer here is 5.
Therefore, f(4.8) = âŒˆ4.8âŒ‰ = 5
Floor function is the reverse function of the ceiling function. It provides us with the largest nearest integer or multiple of significance of the specified value.
The formula used to find the floor value for any given value is as below and is denoted by:
f(x) = âŒŠxâŒ‹ = Highest Nearest Integer of specified value
Letâ€™s take an example
Example: Find the floor value of 4.8.
Answer: Given, x = 4.8
If we observe, the number of integers less than 4.8 is 4, 3,2,1,0, and -1,-2 and so on.
So, the largest integer will be 4.
f(4.8) = âŒŠ4.8âŒ‹ = 4
The graph of ceiling function is a discrete graph that contains discontinuous line segments with one end having a dark dot (closed interval) and another end having an open circle (open interval). The ceiling function is a type of a step function because it looks like a staircase.
The ceiling function graph is shown below:
[Image will be uploaded soon]
Example 1:
Determine the ceiling function of 3.5 and â€“ 3.5. Also, explain your answer.
Solution:
âŒˆ3.5âŒ‰ = 4 and âŒˆ- 3.5âŒ‰ = â€“ 3
Explanation:
The ceiling function of a real number is the least integer number greater than or equal toÂ (â‰¥ ) an assigned number.
In the case of 4.5, the integers more than 3.5 are 4, 5, 6, 7, 8, 9 â€¦..
The smallest of all is 4.
Thus, âŒˆ3.5âŒ‰ = 4.
In the case of -3.5, the integers that are greater than â€“ 3.5 are â€“ 4, â€“ 3, â€“ 2, â€“ 1â€¦
Therefore, the smallest of them is â€“ 4
Hence, âŒˆ- 3.5âŒ‰ = â€“ 3
Fun Facts
Though floor function and ceiling function differ in function, the integer of both floor and ceiling remains the same. In other words, the floor and ceiling of 3 are 3 for both of them.
Both the floor and ceiling functions are denoted by square brackets symbol, but with top and bottom parts missing.
Â 1. What is the Difference Between the Ceiling Function and the Floor Function?
Answer: The floor and ceiling function do not only have a different definition but they also differ in other ways too that are as below:
Basis | Ceiling Function | Floor Function |
Definition | Returns the smallest value for the specified number | Returns the highest value for a given number |
Graphical Representation | In the ceiling function graph, it consists of a solid dot on the right and an open dot on the left | In the floor function graph, the solid dot is on the left whereas the open dot is on the right |
Value | If 3.6 is a specified value, then the ceiling value is 4. | If 3.6 is a specified value, then the floor value is 3 |
2. What is the Use of the Floor Ceil Function?
Answer: Being a financial analyst, we can use the ceiling math function in establishing the pricing after offering discounts or converting currency etc. When preparing financial models, it enables us to round up the numbers to the nearest multiple or integer as per the requirement.
3. What is Meant By Integer Floor Function?
Answer: The integer part or also known as the integral of x, often represented [x] is âŒˆxâŒ‰, if x is nonnegative, and âŒˆxâŒ‰ otherwise. In other words, this is the integer that contains the highest absolute value less than or equal to the absolute value of x.