(sqrt(-2))^2
|
10-06-2016, 04:01 PM
(This post was last modified: 10-06-2016 10:27 PM by compsystems.)
Post: #10
|
|||
|
|||
RE: (sqrt(-2))^2
I discovered the problem
In infix notation and linear infix notation , the precedence rules say the brackets () are evaluated first, then unary operators (change of sign/NEG [-]), then the multiplier operators (*, /, mod, ^), then the sum operators (+, -) ... then √, ... -2 ^ 2 is equivalent to -(2^2) the brackets (2^2) is evaluated first -> 4 then changes sign -(4) -> NEG(4) the end result is -4 (-2)^2, the brackets (-2) is evaluated first NEG(2) -> -2, Then (NEG(2))^ 2 -> -2*-2 the end result is 4 The brackets () are also used to delimit the function arguments f(arg1, arg2, ..., argN) sqrt( arg ) or √(arg) -> ____¬ √arg HP-PRIME KEY SEQUENCE (TEXT BOOK MODE aka 2D printing, infix notation ) ENTRY LINE [√▣] + [2] + [±] is √(-2)¬ -> sqrt(-2) -> i*√2 // ok https://www.wolframalpha.com/input/?i=%E2%88%9A(-2) [√▣] + [2] + [±] + [-3] is √(-2-3)¬ -> sqrt(-2-3) -> √(-5) ¬ -> i*√5 // ok https://www.wolframalpha.com/input/?i=%E2%88%9A(-2-3) Now [√▣] + [2] + [±] + [^2] is √(-2^2)¬ -> sqrt(-2^2) -> √(-(2^2) )¬ -> √(-(4)) ¬ -> √(-4)¬ -> 2*i // ok https://www.wolframalpha.com/input/?i=%E2%88%9A(-2%5E2) [√▣] + [2] + [±] + [>] + [spc] + [spc] «out of the radical » + [-3] is √(-2)¬ -3 -> sqrt(-2)-3 -> √(-2)-3 -> -3+(i*√2) // ok https://www.wolframalpha.com/input/?i=%E2%88%9A(-2)-3 Problem Parser with ^2 in the example above it works well (√(-2)¬ -3) -> sqrt(−2)-3 [√▣] +[2] + [±] + [>] + [spc] « out of the end symbol radical (¬) » + [^2] retunrs 2 // ???? √(-2)^2 Brackets are the delimiters of radical function, must be as sqrt(−2)^2 and not sqrt(−2^2) , otherwise ambiguity is generated with the case √(-2)-3 [√▣] +[2] + [±] + [>] + [^2] must be for next firmware =) ( √(-2) )^2 -> sqrt(-2)^2 -> -> (√(-2))¬^2 -> (√( neg(2) )^2 -> (i*√2)^2 -> 2*(-i)^2 -> -2 // ok https://www.wolframalpha.com/input/?i=(%...A(-2))%5E2 HP-PRIME KEY SEQUENCE (ALGEBRAIC MODE aka LINEAR MODE 1D, aka linear infix notation ) ENTRY LINE [√] + [2] + [±] is √(-2)¬ -> i*√2 // ok [√] + [2] + [±] + [-3] is √(-2-3)¬ -> √(-5) ¬ -> i*√5 // ok Now [√] + [2] + [±] + [>] + [spc] « out of the end symbol radical (¬) » + [-3] is √(-2)¬ -3 -> (i*√2) -3 // ok [√] + [2] + [±] + [^2] is √(-2^2)¬ -> √(-(2^2) )¬ -> √(-(4)) ¬ -> √(-4)¬ -> 2*i // ok |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(sqrt(-2))^2 - retoa - 10-05-2016, 02:33 PM
RE: (sqrt(-2))^2 - toml_12953 - 10-05-2016, 03:01 PM
RE: (sqrt(-2))^2 - retoa - 10-05-2016, 03:04 PM
RE: (sqrt(-2))^2 - parisse - 10-05-2016, 07:13 PM
RE: (sqrt(-2))^2 - retoa - 10-05-2016, 09:24 PM
RE: (sqrt(-2))^2 - Tim Wessman - 10-05-2016, 10:37 PM
RE: (sqrt(-2))^2 - parisse - 10-06-2016, 05:10 AM
RE: (sqrt(-2))^2 - retoa - 10-06-2016, 06:47 AM
RE: (sqrt(-2))^2 - Tim Wessman - 10-06-2016, 02:12 PM
RE: (sqrt(-2))^2 - parisse - 10-06-2016, 06:05 PM
RE: (sqrt(-2))^2 - John P - 10-06-2016, 07:26 PM
RE: (sqrt(-2))^2 - compsystems - 10-06-2016, 07:58 PM
RE: (sqrt(-2))^2 - compsystems - 10-06-2016 04:01 PM
RE: (sqrt(-2))^2 - parisse - 10-06-2016, 08:19 PM
RE: (sqrt(-2))^2 - compsystems - 10-06-2016, 08:36 PM
RE: (sqrt(-2))^2 - parisse - 10-07-2016, 06:27 AM
RE: (sqrt(-2))^2 - compsystems - 10-08-2016, 03:38 AM
|
User(s) browsing this thread: 1 Guest(s)