On 23 Dub, 20:38, William Stein <[email protected]> wrote:
> On Thu, Apr 23, 2009 at 6:44 AM, philabuster <[email protected]> wrote:
>
> > Hi,
>
> > I was wondering why Sage expands products of sums in an unexpected
> > order:
>
> > var('a0,a1,b0,b1,b2,c0,c1,c2,c3,d0,d1,d2,d3,d4')
>
> The ordering of these terms is determined by maxima -- Sage doesn't
> control that at all, just leaving them in the default order maxima
> chooses.
>
>
>
> > expand((a0+a1)*(b0+b1))
>
> > a1*b1 + a0*b1 + a1*b0 + a0*b0
>
> And in Maxima:
>
> wst...@geom:~/db/wuthrich-twist/data$ sage -maxima
> Maxima 5.16.3http://maxima.sourceforge.net
> Using Lisp CLISP 2.47 (2008-10-23)
> Distributed under the GNU Public License. See the file COPYING.
> Dedicated to the memory of William Schelter.
> The function bug_report() provides bug reporting information.
> (%i1) expand((a0+a1)*(b0+b1));
> (%o1)                    a1 b1 + a0 b1 + a1 b0 + a0 b0
>

You can use commands orderless and ordergreat in Maxima to change the
default behavior.

see 
http://maxima.sourceforge.net/docs/manual/en/maxima_6.html#Item_003a-ordergreat

Works in Maxima but not in Sage :-(    - even if I use unorder first.


Robert


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to