# Difference Between Ceil and Floor Functions

**Ceil vs Floor Functions**

Ceil (short for ceiling) and floor function are both mathematical functions. It is often used in mathematical equations as well as in computer science in the likes of computer applications like spreadsheets, database programs, and computer languages like C , C+, and Python.

Ceil and floor functions are different in many respects. For example, ceil function returns the least value of the integer that is greater than or equal to the specified number. On the other hand, floor function gets the greatest value that is less than or equal to the specified number. The specified number is always a double precision number.

Both ceil and floor functions have domain and range. Domain refers to a set that contains all the real numbers while range encompasses the set that contains all the integers (the numbers with the positive and negative attributes). An example of ceil and floor function would be finding the least and greatest value of 2.47. If the floor function is used, the result will be 2 while the answer will be 3 if the ceil function is used instead. Since the given number is positive, the answer will retain the positive attribute (or the negative one if the given number is negative). Another concern here is that the answer is rounded up. The ceil function rounded the answer to 3 while the floor function rounded down the answer to 2. This only applies to the numbers who have a fractional part or are not an exact number. Regarding exact numbers, there is no need to round up the number.

There is also a big difference when expressing both functions. Both functions use square brackets in expressing and containing the given number. In floor function, it is characterized by using boldface and plain square brackets to house the number. Also, there are times when the top part of the square bracket is missing to indicate this function.

On the other hand, the ceil function, uses reversed boldface and reversed plain, square brackets to signify the function being used. Another way is to have the bottom part omitted of the square bracket. To eliminate confusion, some use the word form. The word form actually contains the word “ceil” and “floor” to indicate the function and the number that is enclosed inside the parentheses. There is a rule that there should be no space between the function being used and the parentheses.

In graphing both the ceil and floor function, the graph usually looks like a step or a staircase of lines with two dots on each side. One dot is solid and blacked (this means that the value represented is included) while there is also an open or unshaded dot (this means that the value being represented is not included). In floor l function, the solid dot is usually on the left side of the line, and the open dot is on the right while in the ceil function it is the reverse (the solid dot is on the right side and the open dot is on the left).

Summary:

1.Ceil and floor functions have different definitions. A ceil function returns the smallest value that is greater or equal to the specified number while the floor function returns the largest number that is less than or equal to the number.

2.Writing the ceil and floor functions using brackets is also different. Ceil function uses reversed boldface or plain, square brackets while floor function uses boldface or plain, square brackets. Others prefer simply by removing the top part of the square bracket (for floor function) or the bottom part (for ceil function).

3.Another difference is made by looking at the graph of the function. Ceil functions have an open dot on the left and a solid dot on the right. The reverse is for floor functions with an open dot on the right and a solid dot on the left.

- Differences Between Fraternity And Sorority - January 8, 2014
- Differences Between Lucite and Plastic - January 7, 2014
- Differences Between Oil and Butter - January 6, 2014

### Search DifferenceBetween.net :

Email This Post : If you like this article or our site. Please spread the word. Share it with your friends/family.