Re: [q-lang-users] Complex numbers
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2006-06-12 22:22:45
|
John Cowan wrote: > And likewise "unparse (rat X Y) = '(X/Y)"? Nope that won't work, because X:Int/Y:Int is a builtin which returns a floating point value. (No way to change this any more, this would just break too much existing code.) But Rob has a rational division operator 'over' in his module, so unparsing to '(X over Y) would work in this case. > [unparsing stuff...] > Sounds excellent to me. Of course, there would be the risk that > whatever the pretty-printer produced would not in fact parse > and evaluate to the same thing, but that's the price you pay > for sharp tools. O.k., I think I'll give it a go. (Actually I wanted to start writing a Q yacc in Q this week, but that can wait some more...) -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |