negative number raised to even power
|
05-07-2015, 06:29 PM
Post: #70
|
|||
|
|||
RE: negative number raised to even power
(05-07-2015 05:50 PM)Dave Britten Wrote: Then I disagree with "standard mathematical notation". If -2^2=-4, then as far as I'm concened, 2.5^2=2.25 is just as valid. I strongly agree with Dave. -2 is a number preceded by the unary minus operator and 0-2 is a subtraction. In "the C programming language" 1977 by Kernighan/Ritchie/ Prentice Hall, Inc. the unary minus is already defined (operators, page 54 in the german edition) and has higher priority than multiplication/division and thus also higher than exponentiation, (but as exponentiation is not an operator but a function call in C this is inherent). See also wikipedia "Operators", which differentiates also between unary minus and subtraction operator. Imagine you store the number -2 in register 0 of an RPN calculator or in a variable y in C, then Code:
or Code:
Bernhard That's one small step for a man - one giant leap for mankind. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)