From: Richard F. <fa...@be...> - 2016-04-01 15:22:40
|
This reminds me of a set of bugs I reported in Wolfram's Mathematica. A while ago. Maybe the simplest indication is that (still, in Mathematica 10) Head[3+4 I] returns Complex Head[a+b I] returns Plus this means that a pattern a_+b_ I does NOT match 3+4 I but does match x+y*I. If you want to match 3+4 I you can use a pattern Z_Complex but either of these two fails if you want to 3+x+ 4 I to match. So you need a third. Bringing us back to Maxima ... the Common Lisp objects for complex numbers and for rationals are viewed as "atoms" and so all the Maxima code that looks for lists beginning with mplus and involving $%i to identify complex numbers, and for lists beginning with rat for rationals ... have to be augmented somehow. RJF On 4/1/2016 5:58 AM, Barton Willis wrote: > > >PS The case for Lisp rationals is a little different, but not hugely > so. The performance gains are smaller, > > > CL complex numbers would automatically give us rectangular form for > complex number arithmetic. That would be nice. Likely the least > disruptive way to achieve this wouldn't be to allow naked CL complex > numbers to be Maxima expressions, but to squeeze code into simplus and > friends. > > > --Barton > > > > > ------------------------------------------------------------------------------ > Transform Data into Opportunity. > Accelerate data analysis in your applications with > Intel Data Analytics Acceleration Library. > Click to learn more. > http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140 > > > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss |