homogeneity: Relational Operators A==B => true/false - Printable Version +- HP Forums ( https://www.hpmuseum.org/forum)+-- Forum: HP Calculators (and very old HP Computers) ( /forum-3.html)+--- Forum: HP Prime ( /forum-5.html)+--- Thread: homogeneity: Relational Operators A==B => true/false ( /thread-8920.html) |

homogeneity: Relational Operators A==B => true/false - compsystems - 08-27-2017 01:25 PM
expr1:=[5≤8, 9≥8, sqrt(4)≠2, sqrt(4)=2, sqrt(4)==2, 1 AND 0, true and false]; returns xcas: [true,true,false,2=2,true,false,false] expr2:=[x≤y, x≥y, 'x≠y', x≠y, x==y, x=y, x AND y]; returns xcas: [y>=x,x>=y,x<>y,true,false,x=y,(x and y)] eval(expr2(3),1); returns xcas: x<>y eval(expr2(3),2); returns xcas: true RE: - compsystems - 02-10-2018 04:13 AM
In the first release of firmware 2018, I observe that the expressions that return A≠B already throw true or false, but their inverse A==B still returns a numerical value 1/0. I think that uniformity should be given, in CAS mode true/false, and in numeric mode (home) 1/0. From the point of view of the logic of an algorithm, it is indifferent if it returns true/false or 1/0, but from the didactic point, sometimes returning true and other times 1, it can cause repeated questions in the students. Why does this happen? The majority of users of this forum, and even the developers do not disagree with me, because they are limited to the use of the device, in my case I use it as a tool in the classroom. Xcas SIMPLIFY MAXIMUM: (x+y)^2 == x^2+2*x*y+y^2 returns: true Xcas NONE OR SIMPLIFY MINIMUM: (x+y)^2 == x^2+2*x*y+y^2 returns: false |