Page 1 sur 1

evalb cmd

Publié : jeu. nov. 08, 2018 7:35 pm
par compsystems
Hi BP, in the following case evalb does not work.
As a suggestion, each comparison should return true/false, for the educational environment, it is better to use symbolic words than their numerical equivalents


Exercice:
x ∈ [-5,-3,-1,1]
For what values of x does the inequality x ≥ -1 is a true or false expression?

evalb( map([-5,-3,-1,1], x→ x≥-1 ) ) ↦ [0,0,1,1] ↦ [false,false,true,true]


map([-5,-3,-1,1], x→ x≥-1 ) ↦ [false,false,true,true]

in the following cases there is no consistency, sometimes true/false other 1/0

//

[[ 0 or 0],
[ 0 or 1],
[1 or 0],
[1 or 1]]



[[false],
[true],
[1],
[1]]

//

[[ 0 and 0],
[ 0 and 1],
[1 and 0],
[1 and 1]]



[[0],
[0],
[false],
[true]]

//

[[ 0 xor 0],
[ 0 xor 1],
[1 xor 0],
[1 xor 1]]



[[0],
[1],
[1],
[0]]

Re: evalb cmd

Publié : ven. nov. 09, 2018 8:52 am
par parisse
If your students understand how to use map, then certainly they can understand that 0 corresponds to false, and non 0 corresponds to true.

Re: evalb cmd

Publié : ven. nov. 09, 2018 12:07 pm
par compsystems
parisse a écrit :
ven. nov. 09, 2018 8:52 am
If your students understand how to use map, then certainly they can understand that 0 corresponds to false, and non 0 corresponds to true.
Hello BP, in the textbooks of mathematics the words true / false are used, and the students when starting in the computational reasoning learn their computer equivalents 1/0. But the point of this discussion is that the evalBoolean command is not operating, besides there is inconsistency in others outputs. I think that for you it is Irrelevant, because you designed GIAC to do scientific calculation or technical computation, not to teach mathematics, that is to say to make calculations where it is impractical to do them by hand or impossible manually.

Thanks

JaiMeza