CAS command question
|
01-07-2017, 07:52 AM
Post: #47
|
|||
|
|||
RE: CAS command question
(01-06-2017 08:28 PM)DrD Wrote:(01-06-2017 06:57 PM)chromos Wrote: This works: When you enter a commandline and press enter, the first step that happens is parse: implicit multiplication is not supported in the CAS parser except for a few obvious cases, (1/3)x will error. The second step is evaluation: evaluation of symbolic expressions is a recursive process: first eval the arguments, then apply the command or function on the evaled arguments. This is the reason why left(x<2) will return 2, x<2 is evaled to 2>x before left is applied. In algebraic mode, arguments are evaled before the command is applied. This is the main difference with RPN, where arguments are not EVAL-ed when you run a command (except if the user explicitly calls EVAL). That's why I said that RPN gives you much more control on evaluation than algebraic mode, this is one strength of RPN, but RPN has weaknesses, for example it's much harder to have optional arguments. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)