Hello, why doesn't the distributive law apply in the arithmetic case?
(a<b)+c [enter] (b+c)>(c+a)
(9>8)-1 [enter] true-1, (1) -1 = 0
(9>8)-1 [enter] 9-1 < 8-1 , 8<7, true
(a<b)+c
Modérateur : xcasadmin
-
- Messages : 613
- Inscription : sam. févr. 04, 2017 11:34 pm
- Localisation : Colombia
- Contact :
Re: (a<b)+c
You can prevent evaluation with quote
quote(9>8)-1
quote(9>8)-1
-
- Messages : 613
- Inscription : sam. févr. 04, 2017 11:34 pm
- Localisation : Colombia
- Contact :
Re: (a<b)+c
Why does the computational engine apply the rule of evaluating the left side first when it is an arithmetic operation? This is a standard in other CASs.
Re: (a<b)+c
evaluation is done from 1st arg to last arg of commands, it's probably the same for other CAS.
-
- Messages : 613
- Inscription : sam. févr. 04, 2017 11:34 pm
- Localisation : Colombia
- Contact :
Re: (a<b)+c
If symbolically (a<b)+c is interpreted as an inequality, adding +c to it, (b+c)>(a+c), arithmetically it has to be the same to be consistent.
Re: (a<b)+c
I understand that (a<b)+c is interpreted as "the result of inequality a<b plus c". But I also understand what you want. However it can be done in this way:
Code : Tout sélectionner
ineq: = a<b [enter} b>a
ineq+c [enter] (b+c)>(a+c)