IntegerPart
The integer part of x: x truncated toward 0.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram Language
IntegerPart!IntegerPart(x)x truncated toward 0.Typed signatures
| Type | Package | Applies |
|---|---|---|
(number) -> number | analytic | always |
Details
- Truncates toward 0, unlike Floor (which rounds toward ): , where .
- Exact at an exact argument -- a rational reduces to an exact integer, and so does a symbolic constant like Pi (, not a decimal).
- At a concretely complex argument, truncates the real and imaginary parts separately.
- always -- see FractionalPart.
Examples
Properties #
An integer is its own integer part
live ↗InOut
Known value · Wolfram MathematicalFunctionData, IntegerPart
A negative integer is unchanged
live ↗InOut
Known value · Wolfram MathematicalFunctionData, IntegerPart
Truncation toward zero gives for
live ↗InOut
Known value · Wolfram MathematicalFunctionData, IntegerPart
Negative values round up toward zero:
live ↗InOut
Known value · Wolfram MathematicalFunctionData, IntegerPart
Nested integer parts: the inner one is expanded first, then the outer one over its pieces
live ↗InOut
About
| Examples | 25 |
|---|---|
| Checked against | Wolfram Language 23 agree2 differ |
| Crosswalk | Wolfram Language |