>> Sorry, but now there is no way to display the internal representation
>> 2^(3/2) as 2*sqrt(2).
No problem for that :-) It's not important, I was only wondering if
there could be some way to display square roots, but only because I'm
used to see it separately from integer powers and I find it more
readable.
> I think it is not difficult to extend the display package to get the
> desired output on the display. This is a first and fast extension to the
> routine form-mexpt:
>
> ((and $sqrtdispflag (alike1 3//2 (caddr form)))
> ?(list '(mtimes) 2 (list '(%sqrt) (cadr form))))
> ((and $sqrtdispflag (alike1 '((rat) -3 2) (caddr form)))
> ?(list '(mquotient) 1 (list '(mtimes) 2 (list '(%sqrt) (cadr form)))))
>
> This will give:
>
> (%i10) 2^(3/2);
> (%o10) 2*sqrt(2)
> (%i11) 2^(-3/2);
> (%o11) 1/(2*sqrt(2))
>
> This can be generalized for general expressions with a sqrt function.
>
I think this could be a nice feature. This would only affect display
and not internal representation right? Maybe it could be useful in
association to a display variable to let users choose between the
display of rational exponents and square roots.
In a humble user opinion :-)
Stefano