print and printf commands & autosimplify() flag

Messages in english

Modérateur : xcasadmin

compsystems
Messages : 518
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

print and printf commands & autosimplify() flag

Message par compsystems » mar. oct. 09, 2018 11:24 pm

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?

parisse
Messages : 5112
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: print and printf commands & autosimplify() flag

Message par parisse » mer. oct. 10, 2018 6:05 am

I think that auto-simplification in commands is a bad idea, it's much better to call yourself simplify or regroup inside print.

compsystems
Messages : 518
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

Re: print and printf commands & autosimplify() flag

Message par compsystems » jeu. oct. 11, 2018 12:31 am

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

parisse
Messages : 5112
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: print and printf commands & autosimplify() flag

Message par parisse » jeu. oct. 11, 2018 12:19 pm

?
If you can select something, then Ctrl-C should copy and Ctrl-V paste.

compsystems
Messages : 518
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

Re: print and printf commands & autosimplify() flag

Message par compsystems » jeu. oct. 11, 2018 1:05 pm

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

Répondre