Loading [MathJax]/jax/output/HTML-CSS/jax.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

1.4: The Floor and Ceiling of a Real Number

( \newcommand{\kernel}{\mathrm{null}\,}\)

Here we define the floor, a.k.a., the greatest integer, and the ceiling, a.k.a., the least integer, functions. Kenneth Iverson introduced this notation and the terms floor and ceiling in the early 1960s — according to Donald Knuth who has done a lot to popularize the notation. Now this notation is standard in most areas of mathematics.

Definition 1.4.1

If x is any real number we define x= the greatest integer less than or equal to x x= the least integer greater than or equal to x

x is called the floor of x and x is called the ceiling of x The floor x is sometimes denoted [x] and called the greatest integer function. But I prefer the notation x. Here are a few simple examples:

  1. 3.1 = 3 and 3.1 = 4
  2. 3 = 3 and 3 = 3
  3. 3.1 = -4 and 3.1 = -3

From now on we mostly concentrate on the floor x. For a more detailed treatment of both the floor and ceiling see the book Concrete Mathematics [5]. According to the definition of x we have x=max{nZn} Note also that if n is an integer we have: n=xnx<n+1. From this it is clear that xx holds for all x, and x=xxZ. We need the following lemma to prove our next theorem.

Lemma 1.4.1

For all xR x1<xx.

Proof

Let n=x. Then by (???) we have nx<n+1. This gives immediately that xx, as already noted above. It also gives x<n+1 which implies that x1<n, that is, x1<x.

Exercise 1.4.1

Sketch the graph of the function f(x)=x for 3x3.

Exercise 1.4.2

Find π, π, 2, 2, π, π, 2, and 2.

Definition 1.4.2

Recall that the decimal representation of a positive integer a is given by a=an1an2a1a0 where a=an110n1+an210n2++a110+a0 and the digits an1,an2,,a1,a0 are in the set {0,1,2,3,4,5,6,7,8,9} with an10. In this case we say that the integer a is an n digit number or that a is n digits long.

Exercise 1.4.3

Prove that aN is an n digit number where n=log(a)+1. Here log means logarithm to base 10.

Hint

Show that if (???) holds with an10 then 10n1a<10n. Then apply the log to all terms of this inequality.

Exercise 1.4.4

Use the previous exercise to determine the number of digits in the decimal representation of the number 23321928. Recall that log(xy)=ylog(x) when x and y are positive.


1.4: The Floor and Ceiling of a Real Number is shared under a All Rights Reserved (used with permission) license and was authored, remixed, and/or curated by LibreTexts.

Support Center

How can we help?