Create Roman Numerals

It’s mostly “huitante”, and only very rarely “octante” in French speaking Switzerland.

The reason for using 4 'I’s for the roman numeral 4 instead of IV was only used on clock faces for efficiency (or at least how I understand it) - doing so would require 20 'I’s, 4 'V’s and 4 'X’s - so a single die/mold could be made with IIIIIVX and struck 4 times to produce the correct number of pieces to produce one clock face with no waste. Otherwise, there would be an uneven number of 'V’s and 'I’s

Dunno.
There’s certainly some aesthetic on things like clock faces etc that is oriented to design and not actual use

What I learned was from a history of computation prof at university (former ACM head of the history of computing) and a guest lecturer who was an archeology prof. Both have studied this from actual Roman ruins, writings etc and “modern” Roman numerals (somewhere after about the 7th century) then started to use the subtractive forms (IV being 4, IX etc - although interestingly you DONT tend to write IC, IM, IL)
But in actual daily use the subtractive form apparently wasn’t common at all during the Romans time for tax tallies etc.

Oh yes, this makes sense and finally explain why all these clocks have the wrong 4.

There were two forms of Latin, classical and vulgar, the latter being the commonly spoken form, often differing considerably from the classical. For example, “horse” in classical Latin is “equus” while in vulgar Latin it’s “caballus”. See .

Regarding numbers, it seems that IV and IIII etc were both used, sometimes together in the same document. See . For calculations, the Romans used an abacus and used their written numbering system only for the result. Interestingly, they had no symbol for zero.

Amazingly enough, the Romans lost the zero that the Egyptians knew and some Greeks as well. Maybe precisely the result of the use of the abacus.

Roman numerals with “nine” expanded. In two versions, 1. the original FREEBASIC (from internet), and 2. Xojo rendering.
It returns 49, 99 etc. as XLIX, XCIX, CDXCIX etc.

  1. coded as BASIC
    DIM SHARED arabic(0 TO 12) AS Integer => {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1 }
    DIM SHARED roman(0 TO 12) AS String*2 => {“M”, “CM”, “D”,“CD”, “C”,“XC”,“L”,“XL”,“X”,“IX”,“V”,“IV”,“I”}

FUNCTION toRoman(value AS Integer) AS String
DIM i AS Integer
DIM result AS String

FOR i = 0 TO 12
    DO WHILE value >= arabic(i)
    result = result + roman(i)
    value  = value - arabic(i)
LOOP
NEXT i
toRoman = result

END FUNCTION

  1. coded in Xojo
    DIM Arabic(12) AS Integer = array(1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1 )
    DIM roman(12) AS String = array(“M”, “CM”, “D”,“CD”, “C”,“XC”,“L”,“XL”,“X”,“IX”,“V”,“IV”,“I”)

DIM i AS Integer
DIM result AS String

FOR i = 0 TO 12
WHILE value >= arabic(i)
result = result + roman(i)
value = value - arabic(i)
wend
NEXT
Return result

[code]Dim thou() As Text = Array("",“M”,“MM”,“MMM”)
Dim hun() As Text = Array("",“C”,“CC”,“CCC”,“CD”,“D”,“DC”,“DCC”,“DCCC”,“CM”)
Dim ten() As Text = Array("",“X”,“XX”,“XXX”,“XL”,“L”,“LX”,“LXX”,“LXXX”,“XC”)
Dim ones() As Text = Array("",“I”,“II”,“III”,“IV”,“V”,“VI”,“VII”,“VIII”,“IX”)
Dim roman As Text

roman = thou(((num/1000) Mod 10))
roman = roman + hun(((num/100) Mod 10))
roman = roman + ten(((num/10) Mod 10))
roman = roman + ones(num Mod 10)

Return roman[/code]

@Martin
I like it.