Code
Ways of writing that hide nothing by design — bases, bits, binary formats, floats, Unicode, Roman numerals, timestamps, coordinates, check digits — read and written both ways.
Roman Numerals
Converts numbers to Roman numerals and back, 1 to 3,999,999, an overline multiplying by 1,000 above 3,999; IIII is read and its standard form shown. Cajori (1928) notes that the Romans seldom used the subtractive rule. A chronogram’s numeral letters are added to its year as James Hilton counts them (1882): every I, V, X, L, C, D and M, W as VV.
History, how it works, how it was checked, limits
History
Florian Cajori’s History of Mathematical Notations (1928, §§ 48–51) notes that the subtractive rule, IV for IIII, was seldom applied by the Romans, and that a line over a numeral for thousands appears in late antiquity. A chronogram writes a year in the numeral letters of a sentence, set larger than the rest; James Hilton collected over five thousand (1882) and found none in the West he could call authentic before the fourteenth century.
How it works
Digits are written by taking the largest value that fits, from M, CM, D and CD down to I; above 3,999 a combining overline multiplies by a thousand, so 3,999,999 is M̅M̅M̅C̅M̅X̅C̅I̅X̅CMXCIX. Letters are read place by place, each place written once, in the usual or the additive form, so IIII reads 4 and IV is shown; Unicode’s numeral characters, such as Ⅻ, are read as their letters.
A chronogram is typed with its numerals as capitals and the rest small, as Hilton prints them. Its capitals I, V, X, L, C, D and M are added, W counting 10 as VV (p. xiv); U and J are no numerals. Hilton counts every numeral letter whatever its size (p. viii), so small ones are shown with the year they would give. A year to reach gives what is missing, as a numeral.
How it was checked
Every number from 1 to 4,999, and every 997th to 3,999,999, is written and read back. IVI, XCX, DD and eight more that write a place twice are refused; the additive forms, Unicode’s characters and overlined thousands are read. The same code writes Calendar Systems’ Roman dates, MMDCCLXXIX for 2,779 a.u.c. among them. Hilton’s chronograms give his years: 1628 and 1630 (pp. 2–3), 1620 and 1658 (p. 6), 1632 (p. xiii) and his printer’s 1882.
The tests hold 34 checks of this tool; 3 rest on outside material:
- A standard’s own vectors The 32 Roman numerals of Unicode’s Number Forms (U+2160–U+217F) read as Python’s unicodedata.numeric gives them
- A print’s own example Chronograms: Hilton’s examples give his years, p. 2 (1628), p. 3 (1630, W as VV), p. 6 (1620, 1658), p. xiii (1632) and his printer’s 1882
- A print’s own example Chronograms: each of Hilton’s examples gives the same year by every numeral letter as by its capitals, the u of “ut” (p. 6) no numeral
Limits
IIX and IC, which inscriptions have, are refused, and four overlined Ms are read but refused as too large. Thousands up to 3,000 are written with M (13,000 is X̅MMM). There is no zero and no fraction. The Flemish chronograms that leave D uncounted and read Y as II (Hilton, pp. viii–xiv) are not reckoned, no example having been checked. Number Properties is handed the number, not the letters.