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?
print and printf commands & autosimplify() flag
Modérateur : xcasadmin
-
- Messages : 562
- Inscription : sam. févr. 04, 2017 11:34 pm
- Localisation : Colombia
- Contact :
Re: print and printf commands & autosimplify() flag
I think that auto-simplification in commands is a bad idea, it's much better to call yourself simplify or regroup inside print.
-
- Messages : 562
- Inscription : sam. févr. 04, 2017 11:34 pm
- Localisation : Colombia
- Contact :
Re: print and printf commands & autosimplify() flag
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
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
?
If you can select something, then Ctrl-C should copy and Ctrl-V paste.
If you can select something, then Ctrl-C should copy and Ctrl-V paste.
-
- Messages : 562
- Inscription : sam. févr. 04, 2017 11:34 pm
- Localisation : Colombia
- Contact :
Re: print and printf commands & autosimplify() flag
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.
-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
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)))
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