Post Reply 
(sqrt(-2))^2
10-06-2016, 06:05 PM
Post: #11
RE: (sqrt(-2))^2
(10-06-2016 02:12 PM)Tim Wessman Wrote:  √(-2)^2 is what is being passed to the CAS though. Shouldn't that be interpreted identically to sqrt(-2)^2? It gets evaluated and changed to √((-2)^2) which would indicate to me that the √ function token is being handled in a different way/priority then the spelled out "sqrt" function.
Yes, they are parsed differently because you don't need parenthesis after √, unlike for sqrt. The token for the bison parser is T_NOT, which means you must add parenthesis around the sqrt (they are not required inside): (√-2)^2.
Find all posts by this user
Quote this message in a reply
Post Reply 


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)