HP Forums
[Request] Control of algebraic expressions CAS - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: [Request] Control of algebraic expressions CAS (/thread-6379.html)

Pages: 1 2


RE: [Request] Control of algebraic expressions CAS - parisse - 06-10-2016 06:47 PM

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).


RE: [Request] Control of algebraic expressions CAS - compsystems - 06-10-2016 07:34 PM

In its documentation, a second argument for EVAL is not shown

https://www-fourier.ujf-grenoble.fr/~parisse/giac/doc/en/cascmd_en/node112.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



RE: [Request] Control of algebraic expressions CAS - parisse - 06-11-2016 07:27 AM

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.


RE: [Request] Control of algebraic expressions CAS - compsystems - 06-23-2016 02:03 AM

I do not find the full list of cmds in french
https://www-fourier.ujf-grenoble.fr/~parisse/giac_fr.html#autour


RE: [Request] Control of algebraic expressions CAS - parisse - 06-23-2016 04:26 AM

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.