
Discussion BoardsOpen MenuDiscussion Boards Open Menu
 Welcome to the Community
 1 categories, 7 boards
 Live with HP Experts
 1 boards
 Converged Systems
 1 categories, 1 boards
 Desktops and Workstations
 1 categories, 12 boards
 Mobile
 7 boards
 Networking
 6 categories, 22 boards
 Operating Systems
 7 categories, 77 boards
 Printing and Digital Imaging
 1 categories, 18 boards

BlogsOpen MenuBlogs Open Menu

Community Knowledge BaseOpen MenuCommunity Knowledge Base Open Menu

EnglishOpen Menu
 Community Home
 >
 Mobile
 >
 Calculators
 >
 HP Prime CAS integration
 Subscribe
 Mark Topic as New
 Mark Topic as Read
 Float this Topic to the Top
 Bookmark
 Subscribe
 Printer Friendly Page
HP Prime CAS integration
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
12102013 09:15 PM
As promised in a previous message, here starts some observations on the HP Prime Graphing Calculator.
Take the integration problem of 2 * integral of sqrt(R^2X^2) with respect to X from R to R (not in calculator syntax but hopefully in readable form since I can't type in math symbols here), which derives to the area of a circle, on the HP50g this reduces (EVALs) to pi*R^2 as expected.
However, on the Prime (using 'r' for 'R', and 'x' for 'X'), I get the following error message: "Unable to sort r>(r)". After Esc to get back to the main screen, the result is 2*r^2*ASIN (r/abs(r)). Note that CAS settings have Simplify=Maximum. Now I can see for r>0, this will reduce to the proper formula for the area of a circle. But why didn't the Prime figure that
out? The HP50g appeared smarter (?). Or is there a way to put the r>0 constraint somewhere and have the Prime get the same result? Are there ways to put a list of constraints with expressions to help reduce expressions in CAS?
Take a double integration, this time to find the formula for the volume of a sphere, equal to 2 * integral of [integral of sqrt(R^2X^2y^2) with respect to Y from sqrt(R^2X^2) to +sqrt(R^2 X^2] with respect to X from R to R. (whew! an equation editor on this medium would be nice). On the HP50g, this evaluates to 4*R^3*pi/3 (which is correct).
On the Prime (variables in lower case), I get several pages of error messages (that come faster than I can note)
terminating with the same error as above repeated several times. In the CAS screen the only result is the message "Error: Max order (64) exceeded or non unidirectional series".
Bug(s) or is there something more I have to do?
Re: HP Prime CAS integration
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
12102013 10:34 PM
davetheguru wrote:Take the integration problem of 2 * integral of sqrt(R^2X^2) with respect to X from R to R ... on the HP50g this reduces (EVALs) to pi*R^2 as expected.
However, on the Prime (using 'r' for 'R', and 'x' for 'X'), I get the following error message: "Unable to sort r>(r)". After Esc to get back to the main screen, the result is 2*r^2*ASIN (r/abs(r)). Note that CAS settings have Simplify=Maximum. Now I can see for r>0, this will reduce to the proper formula for the area of a circle. But why didn't the Prime figure that
out? The HP50g appeared smarter (?). Or is there a way to put the r>0 constraint somewhere and have the Prime get the same result? Are there ways to put a list of constraints with expressions to help reduce expressions in CAS?
The HP 50g assumes that R>0. Prime does not, and gives the correct result for any 'r'. In this regard, Prime is "smarter" than the 50g.
If you want to tell Prime to assume that r>0, then in CAS type:
assume(r>0)
Then you'll get the result you want.
Alternative: Instead of r and r as the limits, use abs(r) and abs(r). Same result, without restricting r itself.
Hope that helps!
Joe
Re: HP Prime CAS integration
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
12112013 06:52 PM
Thanks Joe for the tip! I would agree with you on the 'smarter' point. The Prime is also a lot faster. The answers are almost instantaneous (compared to several seconds on the '50g).
When I try the tip with the double integral problem (volume of sphere), I still get no where. Still get several screens of error messages and stops in about 15 seconds. Esc'ing back to CAS screen the result is [0 0.000000] for me.
I was wondering how long assume() affects are persistent. For jus the next operation? CAS session? life of calculator? ...
Re: HP Prime CAS integration
[ Edited ]
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
12112013 10:09 PM  edited 12112013 10:11 PM
davetheguru wrote:I was wondering how long assume() affects are persistent. For jus the next operation? CAS session? life of calculator? ...
Eternity. Or until you undo it, whichever comes first. There are several ways of undoing an assume( ). Here are a few.
Every use of the assume( ) command overwrites all previous assumptions on that variable. For example, if you say assume(r>0) and then assume(r,integer), the result is only that r is assumed to be an integer; the assumption that it is positive is deleted.
You can always check which assumptions exist for any varaible by using the about( ) command.
If you want to have several assumtions on one variable, use the additionally( ) command. For example, to assume that r is a positive integer, one way is assume(r,integer) and then additionally(r>0).
You can remove all assumptions by specifying just the variable. For example, assume(r) removes all assumptions about r. Although not documented, additionally(r) seems to have the same result as about(r), because it adds no new assumptions and then returns the existing ones.
Setting a variable equal to a number deletes all assumptions on that variable (obviously).
Of course, purge(r) not only removes all assumptions about r but also removes it from the CAS variable list entirely.
Joe
Re: HP Prime CAS integration
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
12122013 06:22 AM
I think another way to make a assumptions which is only valid for one calculation is to use the with operator (""), for which a template can be found in the math templates (Button with C).
(Please correct me if I'm wrong.)
Stefan
Tip: you could enter formulas here in the forum by using http://texify.com/ and including the image ("Insert/edit image > from another site")
Re: HP Prime CAS integration
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
12122013 05:31 PM
Thanks Joe for the great info.
And Stefan, yes the '' worked. I first did a purge(r) [thanks again Joe] to remove calculator's previous knowledge about r.
Then I copied the integral to the first box of the '' operator and typed in r>0 in the second (the subscripted box).
I got the same result as when I did assume(r>0).
Cool. Also with the problems still in the history, it was really easy to test this out. A good feature of the Prime.
Re: HP Prime CAS integration
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
01112014 07:35 AM
Hi, DaveTheGuru.
I don't think you're missing anything. I have used HP calculators since the beginning and I've been quite dissapointed with the Prime, especially when compared to the 50g. Here are some thoughts that I sincerely wish were more positive but the Prime is singularly unimpressive:
1. A touch screen should be marketed as, "How to muck up your calculator and scratch the screen." The Prime screen is more delicate and less reliable than the 50g's simpler "no hands necessary" screen and soft keys.
2. S. Jobs was right in this case: Color is a distraction and unnecessary, especially when considering battery drain penalty.
3. A replacement battery is impossible to find and there is no adequate health indicator available for it.
4. Now, a charger must be added to my away bag, whereas I can get batteries for my 50g at the 711 on Pluto, if need be.
5. While the Prime is faster than the 50g, it lacks the programming depth of the 50g. There is a lack of programming flexibility in the Prime as compared to the 50g. Is the Prime's speed accelerated by it's simpler language?
6. Pascal/BASIC sucks out loud as a language here, in the real world, especially when compared to the 50g's native language. Associates of mine who are much better programmers than I will ever be see PPL as a disabledforthesakeofsimplicity (or popularity) language. It seems obvious that the Prime was dumbed down in the design phase, otherwise it would have used C as a base language. (C Compiler too large? Aw, shucks! Start over and figure it out... never happened.)
7. !! > The Prime is lacking a SD port!! Using a computer as a storage medium instead of a SD card means that my highsecurity data and sensitive programs can now be hacked both while the Prime is plugged in to a computer and when the exported data is at rest, stored on the computer. And it may be possible to hack a Prime directly. (I frequently work with TS and above data on my 50g, and (i) it can't be remotehacked, (ii) the radiation signature is very low, so it doesn't broadcast significantly to any receptors, and (iii) I can store my sensitive information on SD cards instead of an optional hackable computer system.) While this doesn't apply to many users, especially students, the associates I work with worldwide use 50g which is approved for TS environments. The Prime is not, which means that developmental scientists in many fields working with sensitive data won't touch them with a 10meter cattle prod.
8. Quite a few of the applications don't work as they are described, or fail in eval. Your examples are excellent, but are the tip of the iceberg.
9. Many of the programs in the User's Guide don't work as shown. I have rewritten some of them successfully during coffee breaks, usually with a completely different design approach that yields the same results.
10. With hackable and prehacked computers abundant now, think of what a OneTime Pad Cipher program on a 50g can accomplish for hackproof communications... Yes, I've written a highly successful modular OTPC program on the 50g. Don't try this on a hackable Prime!
11. There is no available language reference covering all the commands on the Prime at this time. There is a commands list available (not from HP), but it has no functionality descriptions. As is wellknown, there is a sufficient one for the 50g. How can HP release the Prime without a comprehensive language reference? Was it released a year too early?
And the list is much longer than this, but I don't have that kind of time. The Prime is viewed by most scientists and professionals with whom I have contact in many fields as a toy for students, and not practical for serious work. In fact, one associate even postulated that it was developed by a group of students with very little experience! However, there is entertainment value  it is somewhat amusing to watch it stumble and fail over and over again while attempting basic routines.
If HP is thinking that the Prime is a replacement for the 50g, they're digging in the wrong place. The buried treasure lies in developing the 50g to it's next logical step, not going down the wrong path to a predictable dead end. Flashiness without substance is never important or impressive.
A new version of anything should, in theory, be an improvement over what exists. As far as looking forward to improvements to the 50g, well, as the Zen master said, "We'll see."
Advice? Go out and purchase several 50g's and store them in original packaging.