Difference between revisions of "Floor function"

m (proofreading)
(expand)
Line 1: Line 1:
 
The greatest integer function, also known as the '''floor function''', gives the greatest integer less than or equal to its argument.  The floor of <math>x</math> is usually denoted by <math>\lfloor x \rfloor</math> or <math>[x]</math>.  The action of this function is the same as "rounding down."  On a [[positive]] argument, this function is the same as "dropping everything after the decimal point," but this is ''not'' true for negative values.
 
The greatest integer function, also known as the '''floor function''', gives the greatest integer less than or equal to its argument.  The floor of <math>x</math> is usually denoted by <math>\lfloor x \rfloor</math> or <math>[x]</math>.  The action of this function is the same as "rounding down."  On a [[positive]] argument, this function is the same as "dropping everything after the decimal point," but this is ''not'' true for negative values.
 
+
==Examples==
For example:
 
  
 
*<math>\lfloor 3.14 \rfloor = 3</math>
 
*<math>\lfloor 3.14 \rfloor = 3</math>
Line 10: Line 9:
  
 
A useful way to use the floor function is to write <math>\lfloor x \rfloor=\lfloor y+k \rfloor</math>, where y is an integer and k is the leftover stuff after the decimal point. This can greatly simplify many problems.  
 
A useful way to use the floor function is to write <math>\lfloor x \rfloor=\lfloor y+k \rfloor</math>, where y is an integer and k is the leftover stuff after the decimal point. This can greatly simplify many problems.  
 +
 +
==Alternate Definition==
 +
 +
Another common definition of the floor function is
 +
 +
<cmath>\lfloor x \rfloor = x-\{x\}</cmath>
 +
 +
where <math>\{x\}</math> is the fractional part of <math>x</math>.
 
==See Also==
 
==See Also==
 
*[[Ceiling function]]
 
*[[Ceiling function]]
  
 
*[[Fractional part]]
 
*[[Fractional part]]
 +
 +
[[Category:Functions]]

Revision as of 16:55, 24 November 2007

The greatest integer function, also known as the floor function, gives the greatest integer less than or equal to its argument. The floor of $x$ is usually denoted by $\lfloor x \rfloor$ or $[x]$. The action of this function is the same as "rounding down." On a positive argument, this function is the same as "dropping everything after the decimal point," but this is not true for negative values.

Examples

  • $\lfloor 3.14 \rfloor = 3$
  • $\lfloor 5 \rfloor = 5$
  • $\lfloor -3.2 \rfloor = -4$

A useful way to use the floor function is to write $\lfloor x \rfloor=\lfloor y+k \rfloor$, where y is an integer and k is the leftover stuff after the decimal point. This can greatly simplify many problems.

Alternate Definition

Another common definition of the floor function is

\[\lfloor x \rfloor = x-\{x\}\]

where $\{x\}$ is the fractional part of $x$.

See Also