Roman numerals


The roman vocabulary can convert numbers to and from the Roman numeral system and can perform arithmetic given Roman numerals as input.

A parsing word for literal Roman numerals:
ROMAN:


Converting to Roman numerals:
>roman ( n -- str )

>ROMAN ( n -- str )


Converting Roman numerals to integers:
roman> ( str -- n )


Roman numeral arithmetic:
roman+ ( x y -- z )

roman- ( x y -- z )

roman* ( x y -- z )

roman/i ( x y -- z )

roman/mod ( x y -- z w )