Post Reply 
Why does -2^2 compute to -4 on my HP Prime?
02-09-2024, 03:23 PM
Post: #20
RE: Why does -2^2 compute to -4 on my HP Prime?
As the "Elements of Programming Style" puts it:
"Parenthesize to avoid ambiguity"

But I am afraid I was wrong - on teh internet!

powers have higher precedence than unary negation:
   
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Why does -2^2 compute to -4 on my HP Prime? - KeithB - 02-09-2024 03:23 PM



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