HP Forums

Full Version: Simple CAS program
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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:

RETURN CAS.factor(A);

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]

Try RETURN factor(A), instead of RETURN CAS.factor(A)
This works on CAS and on Textbook modes with x in lowercase.

RETURN factor(alg);

pruebaFactoriza(x^2-1) -> (x-1)*(x+1)
(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...
Reference URL's