This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Documentation / Mathematica / Built-in Functions / Numerical Computation / Number Representation /

IntegerPart

FilledSmallSquare IntegerPart[x] gives the integer part of x.

FilledSmallSquare Mathematical function (see Section A.3.10).

FilledSmallSquare IntegerPart[x] in effect takes all digits to the left of the decimal point and drops the others.

FilledSmallSquare Examples: IntegerPart[2.4] LongRightArrow; IntegerPart[2.6] LongRightArrow; IntegerPart[-2.4] LongRightArrow; IntegerPart[-2.6] LongRightArrow.

FilledSmallSquare IntegerPart[x] + FractionalPart[x] is always exactly x.

FilledSmallSquare IntegerPart[x] returns an integer when x is any numeric quantity, whether or not it is an explicit number.

FilledSmallSquare Example: IntegerPart[Pi^2] LongRightArrow.

FilledSmallSquare 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.

FilledSmallSquare See Section 3.2.2.

FilledSmallSquare See also: FractionalPart, Round, Floor, Ceiling, Chop.

FilledSmallSquare New in Version 3.