- number ^ power issue? HP Prime
05-28-2014, 04:58 PM
Post: #1
 CR Haeger Member Posts: 275 Joined: Dec 2013
- number ^ power issue? HP Prime
Hi,

I did not notice following with prior HP Prime firmware:

-3^2 yields -9 but
(-3)^2 yields +9

I hope I am missing something here, otherwise this is a problem.
05-28-2014, 05:09 PM
Post: #2
 Jonathan Cameron Member Posts: 205 Joined: Dec 2013
RE: - number ^ power issue? HP Prime
(05-28-2014 04:58 PM)CR Haeger Wrote:  -3^2 yields -9 but ...

I think this must due to precedence of operators. The Prime (now) thinks that unary negation is lower precedence than exponentiation.

By the way, when I do this in python I get the same thing:

>>> -3**2
-9
>>>
05-28-2014, 05:09 PM
Post: #3
 Thomas Radtke Senior Member Posts: 853 Joined: Dec 2013
RE: - number ^ power issue? HP Prime
Both results appear to be correct.

1. how would you evaluate 0-3^2?

2. the square of a negative number is positive

I hope *I* have not missed anything here.
05-28-2014, 05:15 PM (This post was last modified: 05-28-2014 05:17 PM by Thomas Radtke.)
Post: #4
 Thomas Radtke Senior Member Posts: 853 Joined: Dec 2013
RE: - number ^ power issue? HP Prime
(05-28-2014 05:09 PM)Jonathan Cameron Wrote:  I think this must due to precedence of operators. The Prime (now) thinks that unary negation is lower precedence than exponentiation.
Please have a look here:

http://en.wikipedia.org/wiki/Order_of_operations

In written or printed mathematics, the expression −3^2 is interpreted to mean −(3^2) = −9,[3] [...]

[3] Allen R. Angel, Elementary Algebra for College Students 8/E; Chapter 1, Section 9, Objective 3
05-28-2014, 05:25 PM
Post: #5
 Tim Wessman Senior Member Posts: 2,293 Joined: Dec 2013
RE: - number ^ power issue? HP Prime
48 and 50 do the same in an algebraic obj...

TW

Although I work for HP, the views and opinions I post here are my own.
05-28-2014, 05:29 PM
Post: #6
 DrD Senior Member Posts: 1,133 Joined: Feb 2014
RE: - number ^ power issue? HP Prime
05-28-2014, 06:01 PM
Post: #7
 Tugdual Senior Member Posts: 764 Joined: Dec 2013
RE: - number ^ power issue? HP Prime
(05-28-2014 05:29 PM)DrD Wrote:  http://www.wolframalpha.com/input/?i=-3^2

-ditto-
Same on Google, same on Bing.
05-28-2014, 06:11 PM
Post: #8
 CR Haeger Member Posts: 275 Joined: Dec 2013
RE: - number ^ power issue? HP Prime
Thanks all - yes the Prime (and other calculators) are doing this correctly.

My error.
05-28-2014, 07:05 PM
Post: #9
 Tim Wessman Senior Member Posts: 2,293 Joined: Dec 2013
RE: - number ^ power issue? HP Prime
(05-28-2014 06:11 PM)CR Haeger Wrote:  Thanks all - yes the Prime (and other calculators) are doing this correctly.

Woohoo! I get to win for once!

TW

Although I work for HP, the views and opinions I post here are my own.
05-28-2014, 08:17 PM
Post: #10
 Steve Simpkin Senior Member Posts: 1,095 Joined: Dec 2013
RE: - number ^ power issue? HP Prime
(05-28-2014 07:05 PM)Tim Wessman Wrote:
(05-28-2014 06:11 PM)CR Haeger Wrote:  Thanks all - yes the Prime (and other calculators) are doing this correctly.

Woohoo! I get to win for once!

Well don't let it go to your head

Seriously, Tim. Thank you for all you do and for communicating information with us. Without you and Cyrille I suspect there would be no new RPN calculators from HP and certainly no RPN mode in the Prime.

Steve Simpkin
05-28-2014, 08:18 PM
Post: #11
 Tugdual Senior Member Posts: 764 Joined: Dec 2013
RE: - number ^ power issue? HP Prime
(05-28-2014 07:05 PM)Tim Wessman Wrote:
(05-28-2014 06:11 PM)CR Haeger Wrote:  Thanks all - yes the Prime (and other calculators) are doing this correctly.

Woohoo! I get to win for once!
Ha ha ha thumbs up Tim
05-28-2014, 10:37 PM
Post: #12
 CR Haeger Member Posts: 275 Joined: Dec 2013
RE: - number ^ power issue? HP Prime
(05-28-2014 07:05 PM)Tim Wessman Wrote:
(05-28-2014 06:11 PM)CR Haeger Wrote:  Thanks all - yes the Prime (and other calculators) are doing this correctly.

Woohoo! I get to win for once!

Don't worry, there are a lot more things the Prime can do correctly that I still wouldn't recognize as being correct. Blame my out of date firmware...
 « Next Oldest | Next Newest »

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