Number Digits

The Wolfram Language can handle numbers of essentially unlimited length, in any base, using state-of-the-art platform-optimized algorithms, including several developed at Wolfram Research. For rational numbers, it uses number theoretic methods to efficiently find the exact forms of repeating digit sequences.

IntegerDigits digits of an integer

RealDigits digits of a real number

FromDigits reconstruct a number from its digits

IntegerLength total number of digits in an integer

DigitCount count the number of occurrences of given digits

DigitSum sum the digits of an integer

NumberDigit extract a particular digit in a number

IntegerReverse integer obtained by reversing digits

IntegerExponent  ▪  MantissaExponent  ▪  IntegerPart  ▪  Log10  ▪  Log2

NumberExpand give a number expanded in positional notation

IntegerString digits of an integer as a string

BaseForm display a number in base b

NumberForm  ▪  PaddedForm  ▪  DecimalForm  ▪  PercentForm  ▪  ...

IntegerName name of an integer (e.g. "thirty-five")

RomanNumeral  ▪  FromRomanNumeral

NumberDecompose decompose into multiples of units (e.g. currency denominations)

NumberCompose reconstruct a number from its decomposition

MixedRadix represent mixed radix in all operations (e.g. hours, minutes, seconds)

Bitwise Operations »

BitAnd  ▪  BitOr  ▪  BitXor  ▪  BitNot  ▪  BitShiftLeft  ▪  BitSet  ▪  ...