Post Reply 
CAS.part() behaviour
12-23-2018, 07:09 AM
Post: #5
RE: CAS.part() behaviour
As I explained, it does not simplify but it evaluates. When you run test('1+1'), quote(1+1) is evaled to 1+1, then test is called with argument a==1+1, and when return(a) is evaled, a is replaced by 1+1 and evaled to 2.
You must run test(quote(quote(1+1))) to get '1+1'. (Assuming postprocessing with regroup or simplify is disabled in your settings).
It's almost impossible to prevent evaluation. Evaluation will only do simple operations, like adding integers or rational fractions. It will not simplify polynomials or do more complex tasks. Evaluation is required to do most CAS tasks, otherwise some strange things could happen (for example sqrt or division will not work correctly).
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
CAS.part() behaviour - BruceH - 12-21-2018, 12:20 PM
RE: CAS.part() behaviour - Albert Chan - 12-21-2018, 01:36 PM
RE: CAS.part() behaviour - parisse - 12-21-2018, 06:52 PM
RE: CAS.part() behaviour - BruceH - 12-23-2018, 12:28 AM
RE: CAS.part() behaviour - parisse - 12-23-2018 07:09 AM



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