Post Reply 
[Request] Control of algebraic expressions CAS
06-10-2016, 06:47 PM
Post: #21
RE: [Request] Control of algebraic expressions CAS
Sorry I don't understand your message.
eval accepts an optional second argument, it is the level of evaluation, i.e. the number of times identifiers are replaced by their values. In interactive mode, default eval level is 25 if my recollection is correct, in CAS programs, it should be 1 (i.e. you don't need eval(identifier,1) inside a program, identifier alone will do the same).
Find all posts by this user
Quote this message in a reply
06-10-2016, 07:34 PM (This post was last modified: 06-10-2016 07:35 PM by compsystems.)
Post: #22
RE: [Request] Control of algebraic expressions CAS
In its documentation, a second argument for EVAL is not shown

https://www-fourier.ujf-grenoble.fr/~par....html#2624

in line # 11, the PRINT command not evaluated after the string, why is this happening?

11: print( "with '': " + quote(xpr) ); wait; // returns xpr ??,

Code:

1: #cas
2: p1(xpr):=
3:     BEGIN
4:         local getOperator, part1, part2, expr1;
5:         getOperator:=0;
6:         part1:=1;
7:         part2:=2;
8:         print( "original input: " + xpr ); wait; // retunrs x^3/x^2, PRINT recall xpr ID, OK
9:         print( ": " + 3*xpr*6 ); wait; // returns 3*x^3/x^2*6, PRINT also recall xpr ID, OK
10:         print( ": " + collect(3*xpr*6) ); wait; // returns 18*x, OK
11:         print( "with '': " + quote(xpr) ); wait; // returns xpr ??, why not call QUOTE to xpr ID?
12:         print( "with ' ' and eval external: " + eval(quote(xpr)) ); wait; // returns x^3/x^2 OK
13:         print( "with ' ' and eval internal:'': " + quote(eval(xpr)) ); wait; // returns eval(xpr) ??
14:     END;
15: #end
Find all posts by this user
Quote this message in a reply
06-11-2016, 07:27 AM
Post: #23
RE: [Request] Control of algebraic expressions CAS
the English Xcas documentation is not up to date, sorry...
for your print command, quote(xpr) means xpr will not be evaluated, i.e. will return itself.
Find all posts by this user
Quote this message in a reply
06-23-2016, 02:03 AM
Post: #24
RE: [Request] Control of algebraic expressions CAS
I do not find the full list of cmds in french
https://www-fourier.ujf-grenoble.fr/~par...tml#autour
Find all posts by this user
Quote this message in a reply
06-23-2016, 04:26 AM
Post: #25
RE: [Request] Control of algebraic expressions CAS
The most complete list of commands of Xcas is in the file aide_cas, with short online help in French and English in /usr/share/giac or /Applications/usr/share/giac or c:\xcas.
Find all posts by this user
Quote this message in a reply
Post Reply 




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