HP Forums

Full Version: answer() cmd
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, in CAS mode (hp-prime) "Ans" cmd only operates with the first level =(. One way to work with CAS for beginners is to operate history levels.

for example, hp50 RPN
PHP Code:
'a+b=c'
'a' 
-
SIMPLIFY
returns
'b=c-a' 

xcas
PHP Code:
autosimplify(0):;
c;
ans(-1)-a
simplify(ans(-1))
b=c-

to emulate this situation, a new command is required, it can be called ans(#) (lowercase) that allows to call the specific input (history level)

a+b = c [enter] a+b = c
ans(1)-a [enter] a+b-a = c-a
simplify(ans(1)) [enter] b = c-a
Reference URL's