PCC - Other Fun Math Options (Lesson)

Other Fun Math Options

Math Ceiling and Floor

Wow!!!   Did you know that Math has a process for a ceiling and a floor?  Probably not, at this stage unless you have been doing computer science.  

Rounding: So we understand rounding, correct?

When we have a decimal number if someone asks you to round a number to the tenths place what do you do?

  • You look at the hundredths place and if the number in the hundredths place is 5 or above you add one to the 10ths place, else you would drop the last numbers. 
  • If the 10ths place overflows to a 10, then you add one again to the 1's place etc.

Example 1:   Given 15.362 rounding to the tenth place gives us 15.4 as the hundredth's digit is greater thank of equal to 5.

Example 2:   Given 23.98 rounding to the tenth place gives us 24.0, yes the zero is significant as this is the new tenths place value due to rounding.

Example 3:  Given 356.921 , rounding to the tenths place gives us 356.9 as the 100ths digit is less than 5.

Example 4:  Given 62.057, rounding to the tenths place gives us 62.1

Rounding to any other decimal place works with the same rules whether you are asked to round to the 100th place or the 1000th or any other decimal place.  You look at the next number to the right.  If the number is >=5, you add 1 to the number you are rounding to, otherwise you drop off the rest of the numbers.  

Example:   Given 83.575 rounding to the 100th place is 83.58.

If you are asked to round to a place value and there is no further numbers to the right (really there is a bunch of zeros) then the number remains the same.

Example:   Given 25.36 rounding to the 100th place is 25.36.

Understanding Ceiling

A math ceiling is simply the smallest integer value that is greater than or equal to the given decimal number.   Sometimes called rounding towards positive infinity.  

Example:   Given 4.032 the ceiling is 5.0

Example:  Given  4.0 the ceiling is 4.0

Example:  Given  -3.25 the ceiling is -3

Understanding Floor

A math floor is simply the largest integer value that is smaller than or equal to the given decimal number.   Sometimes called rounding towards negative infinity.

Example:   Given 4.032 the floor is 4

Example:  Given  4.0 the floor is 4

Example:  Given  -3.25 the floor is -4

Ceiling and Floor Side by Side

Using the chart below to examine the use of Floor and Ceiling.  The negative numbers are the hardest ones to do.

Note Line #'s 5 and 6 where zero is crossed.  This is the change from easily understanding.  A look at a number line will help.

Number Line Example

CeilingFloor Chart

The video below shows you how to find ceiling and floor, round, and many other math functions for use.  It is also a  little demo of a basic ceiling and floor evaluator based on user input.  Note the call to the procedure with 2 parameters.

 

IMAGES & VIDEO CREATED BY GAVS AND USED ACCORDING TO TERMS OF USE.