FromDigits
The integer a digit string denotes, in any numeral system. The inverse of IntegerDigits — and the round trip is the whole specification of a system.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram Language
FromDigits!FromDigits([d1, d2, …])integer formed from a digit list in base 10.FromDigits(string, base?)integer formed from a digit string, 0-9 then a-z.FromDigits([d1, d2, …], base)integer formed from a digit list in the given base.FromDigits(digits, system)read the digits in that systemFromDigits(roman, "Roman")the integer a Roman numeral spells, the inverse of RomanNumeral.FromDigits(digits, x)a symbolic base gives the polynomial the digits spell in x.FromDigits(digits, negativeBase)a negative base reads with the same Horner reduction as a positive one.FromDigits({digits, exponent})reads the single {digits, exponent} pair RealDigits itself returns, base 10.Typed signatures
| Type | Package | Applies |
|---|---|---|
(collection<any>, integer?) -> integer | compute-engine | always |
(collection<any>, any?) -> integer | numeralsreplaces compute-engine | always |
Details
- A digit string that denotes NO integer leaves the call standing: two adjacent Zeckendorf ones, an out-of-range mixed-radix digit, residues that no integer satisfies
- In a residue system with moduli that are not pairwise coprime the map is not a bijection, and an inconsistent string has no value
- Zeckendorf is the clearest case of a system whose digits are constrained by a forbidden PATTERN rather than a per-place bound
- Reading a
ResidueNumeralsnumeral IS the Chinese remainder theorem: the digits are the ResidueClass classes of , and ChineseRemainder of those classes gives it back - In a fixed base, the inverse of IntegerDigits: for .
- Digits need not be restricted to -- a digit base simply carries into higher place values.
- An empty digit list has no natural value; compute-engine leaves it unevaluated rather than returning 0.
- compute-engine's FromDigits takes a list of digits, not a digit string.
Examples
14 more kept as data, checked against the oraclesScope #
Properties #
About
| Examples | 38 |
|---|---|
| Checked against | Wolfram Language 25 agree2 differ |
| Crosswalk | Wolfram Language |
See also: IntegerDigits, NumeralSystemShape, ChineseRemainder