a*sqrt(2)/2 => 2^(-1/2)*a whereas the normal display form is a/sqrt(2).
Internal form is:
((MTIMES SIMP) ((MEXPT) 2 ((RAT SIMP) -1 2)) $A)
^^ no simp marker!
expand(%,0,0) correctly gives:
((MTIMES SIMP) ((MEXPT SIMP) 2 ((RAT SIMP) -1 2)) $A)
which displays correctly.
Stavros Macrakis
2008-07-27
Barton Willis
2008-07-30
Logged In: YES
user_id=895922
Originator: NO
By the way:
(%i1) a : 1/sqrt(2)$
(%i2) b : 5*sqrt(2)/2$
(%i3) to_lisp();
No simp marker with add2:
MAXIMA> (add2 (meval '$a) (meval '$b))
((MTIMES SIMP) 6 ((MEXPT) 2 ((RAT SIMP) -1 2)))
A simp marker with add:
MAXIMA> (add (meval '$a) (meval '$b))
((MTIMES SIMP) 6 ((MEXPT SIMP) 2 ((RAT SIMP) -1 2)))
Dieter Kaiser
2009-06-23
With revision 1.80 of simp.lisp we get the expected simplification:
(%i10) a*sqrt(2)/2;
(%o10) a/sqrt(2)
Closing this bug report as fixed.
Dieter Kaiser
Dieter Kaiser
2009-06-23