Simple CAS program
|
08-09-2018, 05:08 AM
Post: #1
|
|||
|
|||
Simple CAS program
Hi all, I am trying to write a simple CAS program, to get my feet wet and eventually write a fairly complicated Laplace transform/ matrix / resolvent thing.
My program is: #cas QQQ(A):= BEGIN RETURN CAS.factor(A); END #end In the CAS screen, when I enter "QQQ(x^2-1)" it yields "factor(A)" but I want "(x-1)*(x+1)" Could someone tell me what I am doing wrong, and maybe guide me to some documentation? I really have tried googling and RTFMing, but I have no idea.[/font] Thanks! |
|||
08-09-2018, 12:35 PM
Post: #2
|
|||
|
|||
RE: Simple CAS program
Try RETURN factor(A), instead of RETURN CAS.factor(A)
|
|||
08-09-2018, 07:10 PM
Post: #3
|
|||
|
|||
RE: Simple CAS program
This works on CAS and on Textbook modes with x in lowercase.
#cas pruebaFactoriza(alg):= BEGIN RETURN factor(alg); END; #end pruebaFactoriza(x^2-1) -> (x-1)*(x+1) |
|||
08-19-2018, 05:00 AM
Post: #4
|
|||
|
|||
RE: Simple CAS program
(08-09-2018 12:35 PM)JMB Wrote: Try RETURN factor(A), instead of RETURN CAS.factor(A) This solved my issue. The reason I put in "CAS." is that gets inserted when the function is chosen from the menu button, which seems like incorrect behavior. I like the HP Prime, but it does seem like it's still a work in progress sometimes... |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)