[Request] Control of algebraic expressions CAS
06-08-2016, 10:12 PM (This post was last modified: 06-08-2016 10:20 PM by compsystems.)
Post: #9
 compsystems Senior Member Posts: 1,342 Joined: Dec 2013
RE: [Request] Control of algebraic expressions CAS
for Bernard

getOperator:=0;
part1:=1;
part2:=2;

part(x^3/x^2); -> part(x^3 * 1/x^2) -> returns 2 OK
part(x^3/x^2,getOperator); -> part(x^3 * 1/x^2,0) -> returns "*" OK
part(x^3/x^2,part1); -> part(x^3 * 1/x^2, 1) -> returns x^3 OK
part(x^3/x^2,part2); -> part(x^3 * 1/x^2, 2) -> returns 1/x^2 OK

now

part(quote(x^3/x^2)); -> part( '(x^3 / x^2)' ); -> returns 2 OK
part(quote(x^3/x^2),getOperator); -> part( '(x^3 / x^2)', 0 ); -> returns "/" OK OK
part(quote(x^3/x^2),part1); -> part( '(x^3 / x^2)', 1 ); -> returns x^3 OK
part(quote(x^3/x^2),part2); -> part( '(x^3 / x^2)', 2 ); -> returns x^2 OK

but

expr1:=quote(x^3/x^2) ;

part(expr1); -> part( '(x^3 / x^2)' ) -> returns 2 OK
part(expr1,getOperator); -> part( '(x^3 / x^2)', 0 ); -> returns "*" ???????????
part(expr1,part1); -> part( '(x^3 / x^2)', 1 ); -> returns x^3 OK
part(expr1,part2); -> part( '(x^3 / x^2)', 2 ); -> returns 1/x^2 ???????????
 « Next Oldest | Next Newest »

 Messages In This Thread [Request] Control of algebraic expressions CAS - compsystems - 06-08-2016, 11:48 AM RE: [Request] Control of algebraic expressions CAS - parisse - 06-08-2016, 12:58 PM RE: [Request] Control of algebraic expressions CAS - compsystems - 06-08-2016, 01:50 PM RE: [Request] Control of algebraic expressions CAS - parisse - 06-08-2016, 07:18 PM RE: [Request] Control of algebraic expressions CAS - compsystems - 06-08-2016, 08:55 PM RE: [Request] Control of algebraic expressions CAS - Tim Wessman - 06-08-2016, 09:10 PM RE: [Request] Control of algebraic expressions CAS - compsystems - 06-08-2016, 09:13 PM RE: [Request] Control of algebraic expressions CAS - compsystems - 06-08-2016, 09:31 PM RE: [Request] Control of algebraic expressions CAS - compsystems - 06-08-2016 10:12 PM RE: [Request] Control of algebraic expressions CAS - parisse - 06-09-2016, 05:44 AM RE: [Request] Control of algebraic expressions CAS - compsystems - 06-09-2016, 10:45 AM RE: [Request] Control of algebraic expressions CAS - parisse - 06-09-2016, 10:58 AM RE: [Request] Control of algebraic expressions CAS - compsystems - 06-09-2016, 11:04 AM RE: [Request] Control of algebraic expressions CAS - parisse - 06-09-2016, 11:59 AM RE: [Request] Control of algebraic expressions CAS - compsystems - 06-09-2016, 12:20 PM RE: [Request] Control of algebraic expressions CAS - parisse - 06-09-2016, 02:23 PM RE: [Request] Control of algebraic expressions CAS - compsystems - 06-09-2016, 06:32 PM RE: [Request] Control of algebraic expressions CAS - parisse - 06-10-2016, 04:46 AM RE: [Request] Control of algebraic expressions CAS - parisse - 06-10-2016, 06:33 AM RE: [Request] Control of algebraic expressions CAS - compsystems - 06-10-2016, 03:27 PM RE: [Request] Control of algebraic expressions CAS - parisse - 06-10-2016, 06:47 PM RE: [Request] Control of algebraic expressions CAS - compsystems - 06-10-2016, 07:34 PM RE: [Request] Control of algebraic expressions CAS - parisse - 06-11-2016, 07:27 AM RE: [Request] Control of algebraic expressions CAS - compsystems - 06-23-2016, 02:03 AM RE: [Request] Control of algebraic expressions CAS - parisse - 06-23-2016, 04:26 AM

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