Post Reply 
answer() cmd
10-08-2018, 07:28 PM (This post was last modified: 10-08-2018 08:43 PM by compsystems.)
Post: #1
answer() cmd
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

https://tiplanet.org/forum/portal.php
Find all posts by this user
Quote this message in a reply
Post Reply 




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