News for hackers. Stuff that matters.
Re:How did anyone do math in Roman numerals? (2017) by User23 on Tuesday July 28, 2020 @12:55AM (#23972401)
Please explain the easy method for adding, for example MCMLXVII and LXV. I mean that seriously, I'm curious what the trick is.
Re:How did anyone do math in Roman numerals? (2017) by philwelch on Tuesday July 28, 2020 @04:02AM (#23973473)
Tokenize, concatenate, sort, reduce.

MCMLXVII + LXV

M CM L X V I I + L X V

M CM L X V I I L X V

M CM L L X X V V I I

V+V=X, L+L=C, C+CM=M so MMXXXII. Convert everything to decimal if you wanna check my work.

Note that converting CM to DCCCC is actually pretty unnecessary since you can just combine CM and C to make M instead of having to count up lots of C’s. A computer algorithm would be simpler by reducing CM to DCCC but adjusting for human fallibility, allowing for CM + C = M makes things a little easier.

Also note that this method scales to any number of sums, not just adding two numbers together.

Re:How did anyone do math in Roman numerals? (2017) by eholk on Tuesday July 28, 2020 @01:39AM (#23972635)
I think originally Roman numerals didn't have shorthands like IV instead of IIII. In that case, to add Roman numerals, you just write the letters all together, sort them, and combine smaller digits into larger digits as necessary.
Re:How did anyone do math in Roman numerals? (2017) by kergonath on Tuesday July 28, 2020 @01:55AM (#23972715)
MCMLXVII+LXV = MCMLLXXVVII = MMXXXII

Addition in Roman numerals is dead simple: you do it by just bunching symbols together. The only difficulty is subtractive notation, which wasn’t really used in Ancient Rome.

Re:How did anyone do math in Roman numerals? (2017) by jeffcoat on Tuesday July 28, 2020 @01:40AM (#23972641)

  MCMLXVII + LXV
   = MCCCCCCCCCLXVII + LXV (canonicalize)
   = MCCCCCCCCCLXVIILXV    (concatenate)
   = MCCCCCCCCCLLXXVVII    (sort)
   = MCCCCCCCCCLLXXXII     (combine, VV => X)
   = MCCCCCCCCCCXXXII      (... keep combining, LL => C)
   = MMXXXII               (... C{10} => M, nothing left to combine)
   = MMXXXII               (optionally, look for ways to re-write with the subtraction rule)
Re:How did anyone do math in Roman numerals? (2017) by philwelch on Tuesday July 28, 2020 @04:06AM (#23973498)
I originally thought canonicalize was an important step, but it actually isn’t for humans. For humans, CCCCCCCCC requires a lot more tedious counting than CM or even DCCCC, leading to more errors than simply allowing the human to notice that CM+C=M.
Re:How did anyone do math in Roman numerals? (2017) by bluesign on Tuesday July 28, 2020 @02:51AM (#23973020)
I think the practical way of thinking would be:

- seeing L + L = C and converting CM to M ( basically striking L L and C )

- then V + V = X, ( striking Vs and add an X)

Then write whats left:

MMXXXII

Then try to re-write.