Floor

Floor[x]

gives the greatest integer less than or equal to x.

Floor[x,a]

gives the greatest multiple of a less than or equal to x.

Details

  • Mathematical function, suitable for both symbolic and numerical manipulation.
  • Floor[x] can be entered in StandardForm and InputForm as x, lf rf, or
    [LeftFloor]x[RightFloor].
  • Floor[x] returns an integer when is any numeric quantity, whether or not it is an explicit number. »
  • For exact numeric quantities, Floor internally uses numerical approximations to establish its result. This process can be affected by the setting of the global variable $MaxExtraPrecision.
  • Floor applies separately to real and imaginary parts of complex numbers.
  • Floor automatically threads over lists.

Examples

open allclose all

Basic Examples  (2)

Round down to the nearest integer:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

Round down to the nearest multiple of 10:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Scope  (5)

Generalizations & Extensions  (5)

Applications  (3)

Properties & Relations  (11)

Possible Issues  (2)

Neat Examples  (3)

See Also

Ceiling  Round  IntegerPart  Chop  Piecewise  BinCounts  Quantile  FindDivisions

Tutorials

Introduced in 1988
(1.0)
| Updated in 2007
(6.0)