Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2002-10-28 12:22:35


On Sat, 26 Oct 2002 13:51:44 -0400, Beman Dawes <bdawes_at_[hidden]>
wrote:

>I hope those interested in Roman Numerals continue to work on the problem,
>and come up with a nice little library for Boost!

That's a trivial exercise but you have to give the specifications :-)
Apart from problems with the representation of some addenda (I
followed by reversed C in place of D, C+I+rev.C in place of M, etc.)
and the horizontal bar to multiply by 1000
_
V = 5000

which, in some cases, was only used (in written texts) to say that the
letters were representing numbers, the main problem is with the
"subtraction principle".

It must have been familiar to romans (BTW they were used to
"subtraction" for their calendar, as you certainly know), but probably
it was for long time only an alternative to other forms. This is
testified by a number of monuments. E.g. among the arches of the
Colosseum in Rome that still stand up the subtraction is not used for
4 and 9 (so you find 24 as XXIIII and 29 as XXVIIII) but it is used
for 40 (40 is written as XL and 44 as XLIIII). Of course as soon as
you move to other periods things get even odder: Castel Sant'Angelo
for instance has a tower where you can read

        ALEXANDER.VI.PONT.MAX

            INSTAVRAVIT

         AN.SAL.MCCCCLXXXXV

And there are examples where subtraction is used for part of a number
but not for all of it. Now I can certainly contribute a trivial
roman_rep class but I would be annoyed to see thousands of replies on
the list pointing out that this or that representation of this or that
number is better. The example of 1999 is classic:

MCMXCIX
MCMXCVIIII
MCMLXXXXIX
MCMLXXXXVIIII
MDCCCCXCIX
MDCCCCXCVIIII
MDCCCCLXXXXIX
MDCCCCLXXXXVIIII

Tell me what you like for both verse of the conversion and, well, I'm
here to please you :-)

Hint: letting the user decide is not welcome (it's IMHO a game taken
as an end to itself, without any historical foundation)

Genny.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk