Post Reply 
Problem with -2<-1 returns 1 => true
06-16-2018, 10:03 PM (This post was last modified: 07-24-2018 05:07 PM by compsystems.)
Post: #1
Problem with -2<-1 returns 1 => true
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

LO SUFICIENTEMENTE BUENO ES ENEMIGO DE LA EXCELENCIA.
Find all posts by this user
Quote this message in a reply
06-19-2018, 11:20 AM
Post: #2
RE: -2<-1 returns 1 => true
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.
Find all posts by this user
Quote this message in a reply
06-19-2018, 12:32 PM
Post: #3
RE: -2<-1 returns 1 => true
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.
Find all posts by this user
Quote this message in a reply
06-20-2018, 05:05 PM (This post was last modified: 06-20-2018 05:11 PM by compsystems.)
Post: #4
RE: -2<-1 returns 1 => true
Another case

5 - (+3) => 2 exact
5 + (-3) => 2. approx this happens sometimes, not always

LO SUFICIENTEMENTE BUENO ES ENEMIGO DE LA EXCELENCIA.
Find all posts by this user
Quote this message in a reply
06-26-2018, 03:42 PM
Post: #5
RE: -2<-1 returns 1 => true
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.
Find all posts by this user
Quote this message in a reply
06-28-2018, 07:49 PM (This post was last modified: 07-20-2018 03:18 PM by compsystems.)
Post: #6
RE: -2<-1 returns 1 => true
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

LO SUFICIENTEMENTE BUENO ES ENEMIGO DE LA EXCELENCIA.
Find all posts by this user
Quote this message in a reply
07-20-2018, 02:45 PM
Post: #7
RE: -2<-1 returns 1 => true
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
"

LO SUFICIENTEMENTE BUENO ES ENEMIGO DE LA EXCELENCIA.
Find all posts by this user
Quote this message in a reply
07-24-2018, 05:11 PM
Post: #8
RE: Problem with -2<-1 returns 1 => true
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

LO SUFICIENTEMENTE BUENO ES ENEMIGO DE LA EXCELENCIA.
Find all posts by this user
Quote this message in a reply
07-24-2018, 08:30 PM
Post: #9
RE: Problem with -2<-1 returns 1 => 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.

— Ian Abbott
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)