http://qs321.pair.com?node_id=600735


in reply to Golf: Magic Formula for Roman Numerals

A useless thought: in FORTH, they'd be using the /mod operator. That's a division operator that returns both the (integer) quotient, and the remainder. Just look at the pattern:
RomanFactorExponent
I10
V50
X11
L51
C12
D52
M13
The factor clearly has a repetitive pattern, with a period of 2, the exponent increments once for every period.
  • Comment on Re: Golf: Magic Formula for Roman Numerals