Mathematica 9 is now available

Documentation / Mathematica / Built-in Functions / New in Version 3.x / Numerical Computation /

IntegerDigits

FilledSmallSquare IntegerDigits[n] gives a list of the decimal digits in the integer n.

FilledSmallSquare IntegerDigits[n, b] gives a list of the base-b digits in the integer n.

FilledSmallSquare IntegerDigits[n, b, len] pads the list on the left with zeros to give a list of length len.

FilledSmallSquare Examples: IntegerDigits[5810] LongRightArrow; IntegerDigits[5810, 16] LongRightArrow.

FilledSmallSquare IntegerDigits[n] discards the sign of n.

FilledSmallSquare If len is less than the number of digits in n then the len least significant digits are returned.

FilledSmallSquare IntegerDigits[0] gives {0}.

FilledSmallSquare FromDigits can be used as the inverse of IntegerDigits.

FilledSmallSquare See Section 3.1.3.

FilledSmallSquare Implementation Notes: see Section A.9.4.

FilledSmallSquare See also: DigitCount, RealDigits, BaseForm, NumberForm, FromDigits, IntegerExponent, IntegerPart, ContinuedFraction.

FilledSmallSquare New in Version 2; modified in 3.

Further Examples



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.