Re: Grammar for roman numerals

"whiskey" <alex.habar.nam@gmail.com>
6 Apr 2007 00:00:11 -0400

          From comp.compilers

Related articles
Grammar for roman numerals msully4321@gmail.com (2007-03-27)
Re: Grammar for roman numerals martin@gkc.org.uk (Martin Ward) (2007-03-29)
Re: Grammar for roman numerals boldyrev+nospam@cgitftp.uiggm.nsc.ru (Ivan Boldyrev) (2007-03-29)
Re: Grammar for roman numerals mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2007-03-30)
Re: Grammar for roman numerals martin@gkc.org.uk (Martin Ward) (2007-03-30)
Re: Grammar for roman numerals mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2007-04-01)
Re: Grammar for roman numerals DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-04-01)
Re: Grammar for roman numerals alex.habar.nam@gmail.com (whiskey) (2007-04-06)
Re: Grammar for roman numerals dickey@saltmine.radix.net (Thomas Dickey) (2007-04-06)
Re: Grammar for roman numerals mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2007-04-06)
Re: Grammar for roman numerals DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-04-08)
| List of all articles for this month |

From: "whiskey" <alex.habar.nam@gmail.com>
Newsgroups: comp.compilers
Date: 6 Apr 2007 00:00:11 -0400
Organization: Compilers Central
References: 07-03-09507-03-107 07-03-119 07-04-006
Keywords: parse, history
Posted-Date: 06 Apr 2007 00:00:11 EDT

> What about "IXIM"? Intuitively this would be 990 (-(-I+X+I)+M), but it
> might be calculated as (-I+X)+(-I+M) = 1008 as well.


Why (-I+X)+(-I+M) and not -(-I+X)+(-I+M) ? Following the same rule as
before ("a smaller number placed before a larger numeral should be
subtracted from it, instead of added to it") the result will be -(-I+X)
+(-I+M) = -(9)+(999) = 999 - 9 = 990. Since (-I+X) is smaller than (-I
+M), it will be substracted, not added.



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.