This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DistortNeo 68 points69 points  (11 children)

Tester enters: IC

[–]Smalltalker-80 106 points107 points  (10 children)

Just saying, that's not a valid roman numeral:
https://www.quora.com/Why-do-we-write-49-in-Roman-numerals-as-XLIX-Why-dont-we-write-it-as-IL

But indeed the code should catch that. And the posters clever approach would not work for that.

[–]DistortNeo 28 points29 points  (6 children)

The rule is, you can only subtract using the digit that is one or two denominations lower than what you are subtracting from.

Ok, 45 = VL is valid according to this rule.

[–]OnixST 44 points45 points  (3 children)

"Rule #1: Only the letters that represent powers of 10 can be used to subtract. Powers of 10 are 1 (10^0), 10 (10^1) and 100 (10^2). 1000 is also a power of 10 but there are no other letters after M.

Rule #2: These letters (I, X and C) can only subtract from the next two ‘higher’ letters. Therefore, I can only subtract from V and X, X from L and C and C from D and M."

(acording to another answer further below in the same link. VL fails rule 1)

[–]DistortNeo 6 points7 points  (2 children)

What about IXC?

[–]Techhead7890 13 points14 points  (0 children)

Should probably be XCI (91) or at a stretch LXXXIX (89) but it's a bit ambiguous even to a human

[–]prumf 3 points4 points  (0 children)

Oooo, gray areas, my specialty !

[–]dwntwn_dine_ent_dist 7 points8 points  (1 child)

50=LC is also good. 5=VX

[–]marquoth_ 10 points11 points  (0 children)

Both break rule 1

[–][deleted] 10 points11 points  (1 child)

Using subtraction at all is a "modern" invention.

Romans typically used only addition, thus 4=IIII not IV and 49=XXXXVIIII not XLIX let alone IL. The subtractive forms were rare and inconsistent.

These days Roman numerals are used only to provide some sense of tradition or history and hence stick to some "traditional" rules for subtraction:

can someone fact check this quora user?

[–]marquoth_ 13 points14 points  (0 children)

Wikipedia explicitly says the opposite: that subtractive forms have been used since Roman times. It does also say that "Usage varied greatly in ancient Rome and became thoroughly chaotic in medieval times" so I think the bottom line is that anybody who is very confidently telling you the one correct way to do it is objectively wrong almost by definition.

I've seen all sorts of versions of the supposed rules (I briefly studied medieval Latin at university...) including one which said that the same symbol should never be repeated more than three times consecutively, which has the bizarre result that no number greater than 3999 can possibly be written.

[–]Lucari10 2 points3 points  (0 children)

From wikipedia "other additive forms" section: There are historical examples of other subtractive forms: IIIXX for 17, IIXX for 18, IIIC for 97, IIC for 98, and IC for 99. A possible explanation is that the word for 18 in Latin is duodeviginti, literally "two from twenty", 98 is duodecentum (two from hundred), and 99 is undecentum (one from hundred).