Forums before death by AOL, social media and spammers... "We can't have nice things"
|    sci.math.symbolic    |    Symbolic algebra discussion    |    10,432 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 9,680 of 10,432    |
|    Richard Fateman to asetofsymbols@gmail.com    |
|    Re: [Axiom] use of Roman numbers    |
|    01 Nov 17 17:21:45    |
      From: fateman@cs.berkeley.edu              In Maxima ..              I:1;       VI:6;       result: I+VI+I;       romanprint(q):=?format(false,"~@r", q);              romanprint(result) ;        returns VIII              This is a silly hack, but the question was silly. Do you want to write       a program to       "use" Roman numbers, really???              As opposed to "read Roman numerals" into some       internal integer form, do arithmetic, and then "write numbers as        Roman numeral constants"... which is, itself only a bit more serious.              It was written, tongue in cheek, as a standard feature of Common Lisp's       format function. Even more, you       have your choice of VI or vi, or "old roman" which uses iiii instead       of iv.       which you see on some clocks.              I assume that Axiom has access to common lisp format as well...              Also, isn't there an Axiom newsgroup suited better suited to such       specific questions about Axiom??              RJF                            On 11/1/2017 2:37 PM, asetofsymbols@gmail.com wrote:       > There is one other way for convert one expression with roman numbers (that       are variable names particular)in the correspondent expression INT       >       > h(a)==       > y:=tex(a).1       > for j in 1..#y repeat       > member?(y.j,"ivxlcmdIVXLCMD")=>1       > return false       > true       >       > -- convert All the variable can be ROMAN NUMBERs too to Numbers decimal       > -- so convert one ROMAN expression       > -- to one INT expression       > m(a:EXPR INT):EXPR INT==       > c:=a;y:=variables(c)       > for j in 1..#y repeat       > if h(y.j) then c:=subst(c,y.j=(y.j::ROMAN)::INT)       > c       >       > -- convert one INT EXPR in ROMAN EXPR       > f(a)==m(a)::EXPR ROMAN       >       > This is a manual copy but the code above seems ok...       >              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca