CAS hp50g non equivalent commands



#2

Hello CAS fans,

The CAS of the hp 50g is powerfull but restricted, restricted in that way, that it doesn't perform non-equivalent term changes (don't misunderstand me, that is good!).

But the built in mechanism to fix a range of a variable is (in my eyes clumsy) and don't work properly in such situations.

So my idea is using the match command (to versions: bottom-up or top-down) for programming in user-RPL such non-equivalent rules (for example: ln(x^2) --> 2*ln(x) which is only possible for x > 0).

So the responsiblity is on the side of the user. He has to have in mind what the range of the used variables is.

It would be nice to have a lot of this programs for extending the CAS.

I will start with two rules:

The first one: XR2EXP will change the writing with root-sign into
writing with exponents (this doesn't touch the problem above, but it is a good exercise in using the match-command).


XR2EXP:
%%HP: T(3)A(R)F(,);
\<<
WHILE { '\v/&A' '&A^(1/2)' } \|^MATCH SWAP { 'XROOT(&A;&B)' '&B^(1/&A)' } \|^MATCH ROT OR
REPEAT
END
\>>
The second: COLEX (COLlect EXponents) uses the rule: (A^B)^C = A^(B*C) (this touches the problem above) :

COLEX:
%%HP: T(3)A(R)F(,);
\<<
WHILE { '(&A^&B)^&C' '&A^(&B*&C)' } \|^MATCH SWAP EVAL EXP2POW XR2EX SWAP
REPEAT
END
\>>
Greetings

peacecalc

Edited: 16 Dec 2012, 2:48 p.m.


Possibly Related Threads…
Thread Author Replies Views Last Post
  HP Prime: CAS taylor Alberto Candel 5 4,099 12-13-2013, 09:45 PM
Last Post: Alberto Candel
  HP Prime CAS curiosity bluesun08 11 4,912 12-10-2013, 01:03 PM
Last Post: Han
  [HP-Prime CAS] "Warning, ^ (Command) Is ambiguous on non square matrices"?? CompSystems 1 2,220 12-07-2013, 07:15 PM
Last Post: CompSystems
  HP Prime: complex numbers in CAS. Alberto Candel 1 1,926 12-06-2013, 02:36 PM
Last Post: parisse
  [HP Prime] plotfunc() bug in CAS Chris Pem10 2 2,448 12-04-2013, 02:46 PM
Last Post: Chris Pem10
  HP Prime: Home/CAS? Alasdair McAndrew 11 3,956 11-26-2013, 02:48 PM
Last Post: Alberto Candel
  HP Prime equivalent of OBJ-> ? John Colvin 2 1,414 11-18-2013, 07:48 PM
Last Post: John Colvin
  HP Prime numerical precision in CAS and HOME Javier Goizueta 5 2,476 11-16-2013, 03:51 AM
Last Post: Paul Dale
  Need CAS help Michael de Estrada 6 2,692 11-13-2013, 01:29 AM
Last Post: cyrille de Brébisson
  HP Prime - CAS functions in Spreadsheet App CR Haeger 6 2,531 11-11-2013, 12:37 AM
Last Post: Michael de Estrada

Forum Jump: