Post Reply 
[Request] Control of algebraic expressions CAS
06-10-2016, 03:27 PM (This post was last modified: 06-10-2016 07:30 PM by compsystems.)
Post: #20
RE: [Request] Control of algebraic expressions CAS
I can not find documentation of the EVAL command, which means the second argument of EVAL
part( eval(a,1), 0);


The following code, why not call QUOTE to xpr ID or argument of p1(xpr)?
Code:

#cas
p1(xpr):=
    BEGIN
        local getOperator, part1, part2, expr1;
        getOperator:=0;
        part1:=1;
        part2:=2;
        print( "original input: " + xpr ); wait; // retunrs x^3/x^2, PRINT recall xpr ID, OK
        print( ": " + 3*xpr*6 ); wait; // returns 3*x^3/x^2*6, PRINT also recall xpr ID, OK
        print( ": " + collect(3*xpr*6) ); wait; // returns 18*x, OK
        print( "with '': " + quote(xpr) ); wait; // returns xpr ??, why not call QUOTE to xpr ID?
        print( "with ' ' and eval external: " + eval(quote(xpr)) ); wait; // returns x^3/x^2 OK
        print( "with ' ' and eval internal:'': " + quote(eval(xpr)) ); wait; // returns eval(xpr) ??
    END;
#end
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [Request] Control of algebraic expressions CAS - compsystems - 06-10-2016 03:27 PM



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