HP Forums

Full Version: Problem with -2<-1 returns 1 => true
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello
A simple update for the next firmware.
Please, improve the consistency in the output

HOME MODE == NUMERICAL MODE
CAS MODE == SYMBOLIC MODE

-2<-1 returns 1 (ok for numerical value for HOME), but for the output for CAS mode should be: true

1 or 1 returns 1
1 xor 1 returns 1

It works very well in other cases, for example

not(-2≤-1) returns false (ok)

1 AND 1 returns true

Another examples
[Image: relationalOperators_hp_prime_versus_xcas.png]

Xcas SIMPLIFY MAXIMUM:
(x+y)^2 == x^2+2*x*y+y^2 returns: true, hpprime returns 1

Xcas NONE OR SIMPLIFY MINIMUM:
(x+y)^2 == x^2+2*x*y+y^2 returns: false, hpprime returns 0
Hello

Which revision and settings do you have?
I get 1 on both calculator and emulator, be it in Textbook, Algebraic or RPN mode.
Version: 2018 1 24. Rev: 13333

Regards.
I get the same behavior as compsystems.
In CAS view,
-2<-1 --> 1
-2<=-1 --> true
In Home view,
-2<-1 --> 1
-2<=-1 --> 1
I have version 2018-02-12 (13441) on the original hardware version A.
Another case

5 - (+3) => 2 exact
5 + (-3) => 2. approx this happens sometimes, not always
comsystems,
I cannot reproduce this behavior. Could you please specify Home View or CAS View each time you submit a problem? By the way, 5-(+3) gives a syntax error in Home View if you are explicitly putting a plus sign before the 3.
Other problems
Boolean operators are not yet working on CAS mode, classpad300/400 ok, ti89/92/v200, ok, hpprime =(

0: NOT(x<13) RETURNS x≥13 // ok
http://www.wolframalpha.com/input/?i=NOT(x%3C13)

1: (x<13) AND (x>5) RETURNS (13>x) AND (x>5) // OK
http://www.wolframalpha.com/input/?i=(x%...ND+(x%3E5)

2: (x<13) AND (x<5) RETURNS (13>x) AND (5>x) // => x<5
http://www.wolframalpha.com/input/?i=(x%...ND+(x%3C5)

3: (x<13) OR (x>5) RETURNS (13>x) OR (x>5) // => TRUE
http://www.wolframalpha.com/input/?i=(x%...OR+(x%3E5)

4: (x<13) OR (x<5) RETURNS (13>x) OR (5>x) // => x<13
http://www.wolframalpha.com/input/?i=(x%...OR+(x%3C5)

5: (x<13) XOR (x<5) RETURNS 0 ? // (x>=5) AND x<13 // [5, 12)
http://www.wolframalpha.com/input/?i=x%3C13+Xor+x%3C5

6: (x>=5) AND x<13 RETURNS
http://www.wolframalpha.com/input/?i=(x%...AND+x%3C13
These small problems have not yet been resolved.

"HP Prime Graphing Calculator
Software Version: 2.0.0.13865 (2018 07 06)
Hardware Version: Emu
CAS Version: 1.4.9
"
CAS:

OR
1 or 1 returns 1 => true
True or True returns true

XOR
1 xor 1 returns Error: syntax error => false
true xor true [enter] Error: syntax error => false

AND
1 and 1 returns true
true and true returns true
(07-24-2018 05:11 PM)compsystems Wrote: [ -> ]CAS:

OR
1 or 1 returns 1 => true
True or True returns true

XOR
1 xor 1 returns Error: syntax error => false
true xor true [enter] Error: syntax error => false

AND
1 and 1 returns true
true and true returns true

It's not a very clear bug description, but I think the bug you are describing is that xor is not automatically changed to XOR, which is inconsistent with related operators? In that case, a related bug is that not without parentheses is not automatically changed to NOT.
Reference URL's