Hello
with autosimplify flag: none
((a=b)*-1 [enter] returns -a=(-b)
((a>b)*-1 [enter] returns (-b)>(-a)
((a=b)*-1)|([a = 4,b = 3]) [enter] returns (-4=-3)
((a>b)*-1)|([a = 4,b = 3]) [enter] returns (true)*-1 => -1 ? // Shouldn't the left side be resolved first?
((a>b)*-1)|([a = 4,b = 3]) => (-b)>(-a)|([a = 4,b = 3]) => -3 >-4 => true
I think the left side should do a low-level evaluation before replacing what the right side indicates.
((a=b)*-1)|([a = 4,b = 3]) => -1 ?
Modérateur : xcasadmin
-
- Messages : 603
- Inscription : sam. févr. 04, 2017 11:34 pm
- Localisation : Colombia
- Contact :
((a=b)*-1)|([a = 4,b = 3]) => -1 ?
Dernière modification par compsystems le mar. mai 14, 2024 12:30 am, modifié 1 fois.
-
- Messages : 603
- Inscription : sam. févr. 04, 2017 11:34 pm
- Localisation : Colombia
- Contact :
Re: ((a=b)*-1)|([a = 4,b = 3]) => -1 ?
Another possible problem is when an expression is applied in an inequality.
(((x-2)/(x+2))<2)*(x+2) [Enter] ([(6+x)/(2+x),(12+2*x)/(2+x)])>0
=> (x-2) < (2*(x+2))
(((x-2)/(x+2))<2)*(x+2) [Enter] ([(6+x)/(2+x),(12+2*x)/(2+x)])>0
=> (x-2) < (2*(x+2))
Re: ((a=b)*-1)|([a = 4,b = 3]) => -1 ?
You should eval the inequation*number before doing substitution.
-
- Messages : 603
- Inscription : sam. févr. 04, 2017 11:34 pm
- Localisation : Colombia
- Contact :
Re: ((a=b)*-1)|([a = 4,b = 3]) => -1 ?
I have noticed that depending on the simplification flag, an assignment is performed.
You can improve the xcas interpreter by adding a flag to the system that allows you to decide whether you want the equal sign to always act as an assignment or not,
You can improve the xcas interpreter by adding a flag to the system that allows you to decide whether you want the equal sign to always act as an assignment or not,