HP Forums
HP Prime: Quite Happy - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: HP Prime: Quite Happy (/thread-257880.html)



HP Prime: Quite Happy - Helge Gabert - 12-06-2013

At the risk of incurring the wrath of other non-Prime HP museum users about posting yet another Prime-related topic (but I have posted here before, asking for help, and have been helped, so I figure I owe this much):

I am quite happy with the bug fixes evident in the Nov. 25 2013 firmware update, most notably EDITLIST and EDITMAT, which were annoying, and the CAS settings now actually stay put. Things seem to be more stable overall - - but maybe this is too early to tell. HP support has been helpful in exchanging a Prime that died.

If now only PPL programs could work with CAS functions, and RPN syntax could be used throughout (not just in Home), I promise I'll hold my breath!


Re: HP Prime: Quite Happy - Michael de Estrada - 12-06-2013

CAS functions will work in PPL programs. You just have to CAS them, i.e. solve(x^2-3=1) in CAS becomes CAS("solve(x^2-3=1)") in a PPL program. Although it gets rather tedious, it does work.

Oh, and btw I'm also a lot happier with my replacement Prime. The first one was a real lemon.


Edited: 6 Dec 2013, 5:55 p.m.


Re: HP Prime: Quite Happy - Helge Gabert - 12-06-2013

Hmmm . . . it doesn't quite work for me.

RETURN CAS("solve(x^2-k1,x)");

(k1 is the argument to the PPL program name, lets say I call it with "4" for k1)

results in {sqrt(k1), -sqrt(k1)} in home and CAS view.

So the argument does not get evaluated.

Does it work for you?




Re: HP Prime: Quite Happy - Michael de Estrada - 12-06-2013

OK, you've run into one of the CAS in PPL quirks. You can't pass a dummy or local variable with a numeric value to a CAS expression in a PPL program. So you need to use:

EXPORT CAS_TEST(k1)
BEGIN
K:=k1;
RETURN CAS("solve(x^2-K=0,x)");
END;

Where K is a global reserved real variable. You will get the result {-2,2}. Also note that I added =0, which is the proper format.

Edited: 6 Dec 2013, 7:22 p.m.


Re: HP Prime: Quite Happy - Helge Gabert - 12-06-2013

Many thanks! I'll remember this trick.

But I think you'll agree that this does not *really* (by any stretch of the imagination) amount to direct support for CAS functions inside PPL programs.

Contrast this to what you would do in the 50G

<< -> k1 << 'X^2' k1 - SOLVEVX >> >>

Done.




Re: HP Prime: Quite Happy - Michael de Estrada - 12-06-2013

I'm not saying it is easier, just that it can be done. I just finished writing a short RPL program that would entail many lines of PPL:

<<K 1 N FOR I CLLCD "ENTER MASS NUMBER" 1 DISP I 2 DISP 1 FREEZE HALT INV I RCI NEXT>>

Live long and prosper.


Re: HP Prime: Quite Happy - Joe Horn - 12-06-2013

Wanna use the full power of CAS functions in programs? Then use CAS programs, not regular programs. Here's one way to create a CAS program.

Step 1: Create a dummy CAS program like this in CAS:

    CAS_TEST(k1):=k1

Step 2: Go into the Program Editor and see it marked as a CAS program, and listed as this:

    (k1)->k1

Step 3: Replace its contents with whatever you want, e.g.:

    (k1)->BEGIN    
RETURN(solve((x^2-k1)=0,x));
END;

Step 4: Now use it in either Home or CAS:

    CAS_TEST(4) --> {-2,2}

Cool, huh?

-Joe-


Re: HP Prime: Quite Happy - Helge Gabert - 12-06-2013

Yes, there is a certain combination of efficiency and elegance (for those who can appreciate this) in RPL programming. Of course, the unlimited stack helps as well. And the fact that everything is handled the same way (as objects on the stack, manipulated by the same commands, be it reals, complex, symbolics, lists, etc. ...).

I wish HP could come out with a 51G built on the speedy hardware foundation of the Prime.


Re: HP Prime: Quite Happy - Helge Gabert - 12-06-2013

Thanks, I know this works (I believe you posted that at an earlier point in time already). The reason I stayed away from this approach was because all "cool" CAS programs generated this way magically disappeared if one cleared the CAS settings or if the Prime rebooted, which it did too often in Rev. 5106.

Perhaps in this Prime firmware update (5447) CAS programs are not so volatile any more. I will check it out!




Re: HP Prime: Quite Happy - Michael de Estrada - 12-06-2013

Don't forget a backlit LCD display.


Re: HP Prime: Quite Happy - Han - 12-07-2013

Quote:
Thanks, I know this works (I believe you posted that at an earlier point in time already). The reason I stayed away from this approach was because all "cool" CAS programs generated this way magically disappeared if one cleared the CAS settings or if the Prime rebooted, which it did too often in Rev. 5106.

Perhaps in this Prime firmware update (5447) CAS programs are not so volatile any more. I will check it out!


I believe this was addressed in the recent firmware. Of course, you should always verify for yourself.


Re: HP Prime: Quite Happy - Joe Horn - 12-08-2013

Quote:
The reason I stayed away from this approach was because all "cool" CAS programs generated this way magically disappeared if one cleared the CAS settings or if the Prime rebooted, which it did too often in Rev. 5106.

Perhaps in this Prime firmware update (5447) CAS programs are not so volatile any more. I will check it out!


The good news is that the recent upgrade got rid of that CAS bug, so your CAS programs won't go away just by clearing the CAS history stack.

The bad news is that CAS programs are not saved as separate files by the Connectivity Kit, but are instead all saved together inside the "cas.settings" file, just like the other CAS variables. This means that you can't use the CK to directly transfer individual CAS programs... at least not as easily as regular programs.

-Joe-


Re: HP Prime: Quite Happy - Michael de Estrada - 12-08-2013

This all highlights the inconsistent way in which items and features are scattered throughout the Prime. So, you create a normal program or function and it appears in the Toolbox in the User menu. But if you create a CAS program or function, it appears under Vars in the CAS menu as a Program. How logical is that ? Then there is the inconsistent way in which you create or delete Home vs CAS variables. Programs appear in the CK for editing or saving, but not User Functions. It's almost as if different people were assigned to the development of certain portions of the Prime and never met with each other to coordinate the effort. I simply don't have to worry about these inconsistencies when using my 50g.


Re: HP Prime: Quite Happy - Eddie W. Shore - 12-10-2013

Most (if not all) CAS commands should work in PPL with the 11/25/2013 update. Remember that the CAS. prefix needs to accommodate the command.