Why not just treat is as a vector, do vector math operations on it, and be done with it? 1+2j is equivalent to [1 2]. 1+2j represents a 2-D vector, does it not? Not only does this handle imaginaries, but higher forms, such as [1 2 3 4]. The beauty of Lisp is that once you accept the basic syntax (atoms and groupings), you don't have to worry about developing EBNF forms for every arbitrary "human readable" notation.
Or I could be totally wrong. On Jun 8, 12:03 pm, Mike Meyer <mwm-keyword-googlegroups. [email protected]> wrote: > On Tue, 8 Jun 2010 10:27:28 -0700 (PDT) > > Steven Devijver <[email protected]> wrote: > > On 8 jun, 16:38, Mike Meyer <mwm-keyword-googlegroups. > > [email protected]> wrote: > > > > Why? It isn't supported for rationals or exponents. Or are you > > > claiming that because we support "3/4" we should also support > > > > (* (my-complicated-algo val)/(my-other-complicated-algo exp) > > > 1/(another-complicated-algo exp2)) > > > > with similar problems because we support "1e3"? > > > What would (Math/pow (Math/E (* 2/5 2 Math/PI i))) return? > > Why is this relevant to a discussion of whether or not support for > complex literals is desirable? All but "i" is involved with the > semantics of complex values, not the literal. > > <mike > -- > Mike Meyer <[email protected]> http://www.mired.org/consulting.html > Independent Network/Unix/Perforce consultant, email for more information. > > O< ascii ribbon campaign - stop html mail -www.asciiribbon.org -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
