IntegerPart

IntegerPart[x]

gives the integer part of x.

Details

  • Mathematical function, suitable for both symbolic and numerical manipulation.
  • IntegerPart[x] in effect takes all digits to the left of the decimal point and drops the others.
  • IntegerPart[x]+FractionalPart[x] is always exactly x.
  • IntegerPart[x] returns an integer when x is any numeric quantity, whether or not it is an explicit number.
  • For exact numeric quantities, IntegerPart internally uses numerical approximations to establish its result. This process can be affected by the setting of the global variable $MaxExtraPrecision.
  • IntegerPart applies separately to real and imaginary parts of complex numbers.
  • IntegerPart automatically threads over lists.

Examples

open allclose all

Basic Examples  (1)

Find the integer part of a real number:

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

Scope  (4)

Generalizations & Extensions  (4)

Applications  (8)

Properties & Relations  (5)

Possible Issues  (3)

Neat Examples  (1)

See Also

FractionalPart  Round  Floor  Ceiling  Chop  Numerator  FindDivisions

Tutorials

Introduced in 1996
(3.0)