Re: [q-lang-users] Complex numbers
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2006-06-13 22:39:32
|
Rob Hubbard wrote: >>unparse (rat P Q) = '(P over Q); > > Should that go into rational.q, or is there a separate location for > the 'unparse' stuff? Yes, into rational.q. (In fact it doesn't really matter where that equation is, but keeping it with the data type is the most obvious choice.) But note that the little example I gave was just to illustrate the new custom unparsing scheme. You might consider to do it similarly in rational.q when Q 7.2 comes out, though. > It would be good if the Complex type could follow similarly, and for > both rectangular and polar coordinates as has been suggested. Well, my immediate goal is to just change the concrete representation to an algebraic type and keep the rest of the interface as it is now, to provide as much backward compatibility as possible. Then I'll probably do a release candidate so that we can discuss what else needs to be added. > 'Rat' rather than 'Rational' No no, Rational is fine. :) Cheers, Albert -- 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 |