Page 1 sur 1
					
				print and printf commands & autosimplify() flag
				Publié : mar. oct. 09, 2018 11:24 pm
				par compsystems
				Hello, BP, the print and printf commands do not take into account the simplification flag, this always makes it print with simplify: none =(
autosimplify(2); DispG; ClrIO; printf(poly2symb(poly1[-16,0,0,x+5,0,y^3+9],t))  => y^3+9+(x+5-16*t*t*t)*t*t,   what is expected is: -16*t^5+t^2*x+5*t^2+y^3+9
Can you make, that  print and printf take into account the autosimplify() flag?
			 
			
					
				Re: print and printf commands & autosimplify() flag
				Publié : mer. oct. 10, 2018 6:05 am
				par parisse
				I think that auto-simplification in commands is a bad idea, it's much better to call yourself simplify or regroup inside print.
			 
			
					
				Re: print and printf commands & autosimplify() flag
				Publié : jeu. oct. 11, 2018 12:31 am
				par compsystems
				true ^
DispG; ClrIO; printf(simplify(poly2symb(poly1[-16,0,0,x+5,0,y^3+9],t))), printf(regroup(poly2symb(poly1[-16,0,0,x+5,0,y^3+9],t))), printf(poly2symb(poly1[-16,0,0,x+5,0,y^3+9],t)) [enter]
exp1, expr2, expr3 after printing the previous three expressions, they are displayed in different groupings or simplifications =), unfortunately I can select them ([m] menu), but I can not copy them. we need the copy function
Select all
copy
Edit selection
simplify
normal
factor
approx
exact
eval
Back
Forward
			 
			
					
				Re: print and printf commands & autosimplify() flag
				Publié : jeu. oct. 11, 2018 12:19 pm
				par parisse
				?
If you can select something, then Ctrl-C should copy and Ctrl-V paste.
			 
			
					
				Re: print and printf commands & autosimplify() flag
				Publié : jeu. oct. 11, 2018 1:05 pm
				par compsystems
				the Xcas Disp window. In the 2D printing part, After selecting a 2D-expr then ctrl+c and trying to paste elsewhere (worksheet) with ctrl+v do not copy anything.
Code : Tout sélectionner
DispG; ClrIO; printf(simplify(poly2symb([-16,0,0,x+5,0,y^3+9],t))), printf(regroup(poly2symb([-16,0,0,x+5,0,y^3+9],t)))
-16*t^5+t^2*x+5*t^2+y^3+9
t^2*(-16*t^3+x+5)+y^3+9
detect that when you select a part of the printout (for example t^2*(-16*t^3+x+5)+y^3+9) and then [m]simplify, , simplifies to -16*t^5+t^2*x+5*t^2+y^3+9 ok, but all the print lines are merged into one, that is, the new line character is lost.
-16*t^5+t^2*x+5*t^2+y^3+9t^2*(-16*t^3+x+5)+y^3+9