Hello BP, why when generating the equation equal(y,x^2) is defined later as y:=x^2, I think this is not very useful, because within the code it is very recurrent to make expressions that remain as they are.
equal2list(equal(x+1,2))*6 the output should be list[ 6*x+1, 6*2 ], and not a sequence 12*(x+1)
equal prefix cmds
Modérateur : xcasadmin
-
- Messages : 603
- Inscription : sam. févr. 04, 2017 11:34 pm
- Localisation : Colombia
- Contact :
Re: equal prefix cmds
= is sometimes evaled to := for compatibility reason (inside programs).
-
- Messages : 603
- Inscription : sam. févr. 04, 2017 11:34 pm
- Localisation : Colombia
- Contact :
Re: equal prefix cmds
but in the worksheet, is better not to evaluate to :=
example
1: y=x^2
2: subst(ans(-1),[x=-1,y=1]) returns 1 =( expected 1=1
example
1: y=x^2
2: subst(ans(-1),[x=-1,y=1]) returns 1 =( expected 1=1
Re: equal prefix cmds
Just give a name to your objects (and avoid ans)
eq:=y=x^2; subst(eq,[x=-1,y=1])
= is evaluated like := at top-level because many users from other programming languages forget the :, but this is done only at top-level.
eq:=y=x^2; subst(eq,[x=-1,y=1])
= is evaluated like := at top-level because many users from other programming languages forget the :, but this is done only at top-level.