powers



Am Montag, den 03.10.2011, 14:12 -0400 schrieb Mark H Weaver:
> Dieter Kaiser <drdieterkaiser at web.de> writes:
> > Am Sonntag, den 02.10.2011, 16:47 -0700 schrieb Raymond Toy:
> >> On 10/2/11 2:22 AM, Pere Castellv? wrote:
> >> > Hi all,
> >> >
> >> > is there a way to obtain 40*sqrt(2) in this computation?
> >> >
> >> > (%i3) 20*sqrt(2)+20*sqrt(2);
> >> > (%o3) 5*2^(7/2)
> >> >
> >> Hmm.  It seems that you can't.  Even 40*sqrt(2) is simplified to 5*2^(7/2).
> >> 
> >> I think this is due to some work done a while a go to fix some other
> >> issues where maxima was not simplifying expressions like this, so maxima
> >> now factors the numbers and puts the factors into the square root.
> >
> > Yes, products with roots and integers are consistently simplified. This
> > might be not the prefered representation, but it allows much better
> > simplification of complex expressions.
> 
> We could modify NFORMAT to convert constant expressions like 5*2^(7/2)
> into a more attractive form.  If others think this is a good idea, I
> could work on it.

Some times ago I suggested the extension of nformat, too, and we had a
short discussion about this point on the mailing list. The result was,
that we should not introduce too much differences between the internal
representation of expressions and their external representation for
display. Another point is, that nformat is not only used for the
display, but also for the part and the subst functions of Maxima.

Dieter Kaiser