On Monday, April 16, 2018 at 3:21:35 PM UTC+2, Dorian Sabaz wrote: > > *sage:* p.factor(dontfactor=[k]) > > 1/2*(pi*n + k*t)/k # bad (factors k still: > dontfactor not recognized for k), 1/2 factored as should be. > > *sage:* p.factor(k) > > 1/2*(pi*n + k*t)/k # bad (factors k still: > dontfactor not recognized for k), 1/2 factored as should be. > > > Should be: > > > 1/2*(pi*n/k + t) or ideally, 1/2*(n*pi/k + t), note the placement of the > "n" (yes it is important for non-commutating algebras). >

The dontfactor issue seems to be a bug, thanks for the report. By calling var() you are using the symbolic expression part of Sage which has a different behaviour from what you expect purely algebraically. Moreover you cannot expect a certain order of terms in sums or products. No CAS will guarantee that the order of n and pi in the symbolic expression (n+pi)^2+(pi+n)^3 will stay the same after evaluation, for example. If you deal with noncommutativity you need to use a dedicated ring not symbolics, see http://doc.sagemath.org/html/en/reference/rings/index.html Regards, -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.