A great product which could become even better.
HP Prime
Graphing Calculator: Official Hewlett-Packard product page.
Reference manual
|
Manuals
|
US Datasheet
|
HP Prime Wireless Kit
Video
|
Facebook Page
The HP Prime is allowed on
AP Calculus and
SAT exams.
It's not allowed on
ACT or
NCEES exams.
Eddie's Math and Calculator Blog by Edward Shore.
Tim Wessman's HP Calculator Stuff, since 2004.
Introducing HP Prime
by Bruce Horrocks (HPCC #609, March 2013).
Cemetech: 2013年05月09日
|
HPCC: HP Prime
HP Graphing Calculators: HP Prime links and resources.
HP Prime, the New Future by Chris Olley (2013).
HP Prime Calculator Portal by Moravia Education (CZ).
HP Prime pre-release functionality
preview (2013年07月16日) by Adrien Bertrand.
HP Prime hands-on review
(2013年08月06日) by Adrien Bertrand.
HHC 2013: Day 1 Highlights
by Edward W. Shore (2013年09月21日).
Understanding HP's New Flagship,
the HP Prime by Lucas Allen (2013年09月24日).
Unveiling
hardware secrets via reverse engineering by Erwin Ried (2013年11月28日).
Pinch to Zoom on the HP Prime!
by Chris Olley (2014年05月28日).
Review of HP Prime Graphing calculator
by T. J. Nelson (2014年11月09日).
HP Prime : A Programmer's View
by Mark Power (2015).
HP Prime Graphing Calculator
Review at Text Tutoring (2015).
HP Prime in the Palace of Westminster.
by Chris Olley (2015年12月10日).
HP Prime Science and Engineering Programs
hpcalc.org prime archive.
HP Prime Graphics Utilities
hpcalc.org prime archive.
HP Prime
Graphing Calculator on the App Store iTunes.
HP Prime for All
by Oleksandr Sidko (2015)
Do
Engineering Students Need a Powerful College Calculator? Ryan Dwyer (Oct. 2013).
Is
Prime a Good Choice for Engineers? by Leo (2015年01月25日).
TI
Nspire CX CAS vs. HP Prime vs. Casio FX-CP400
Physics Forum (April 2015).
Wikipedia : Scientific calculators | Hewlett-Packard. | HP 38G (1995). | HP Prime (2013).
Videos:
Peeking at Prime
by Richard Nelson (2013年09月21日, Fort Collins, CO).
HP Prime:
Initial impressions by rs1n (2013年09月24日).
HP Prime
Graphing Calculator Arrival & Review
by M.J. Lorton (2013年09月27日)
Powering the HP Prime
with AAA batteries by Erwin Ried (2014年01月30日)
HP Prime Graphing
Calculator review by Phipps.TECH (2015年10月20日)
rechargeable lithium-ion battery
3.7 V
1500 mAh or 2100 mAh (*)
(* with Samsung Galaxy S3 battery)
measurements (w/ cover)
width: 85 mm (93 mm)
length: 181 mm (185 mm)
height: 13 mm (16 mm)
weight: 198 g (240.5 g)
HP currently offers two top-of-the-line graphing calculators. The HP-50G, reviewed elsewhere, remains most appealing to programmers, in spite of a lower-resolution B&W screen. The HP Prime, reviewed here, is mostly meant for the educational market (arguably, it's the newest incarnation of the philosophy pioneered by the HP-38G in 1995).
The original HP Prime model (NW280AA or "revision A") did not support three features announced in September 2013 by what is now Hewlett-Packard Enterprise, namely:
Those promises were only fulfilled with the introduction of a new hardware update in 2014 (reporting itself as "version C") endowed with a different product number (G8X92AA). If you need any the above, stay away from the 2013 model which (as of November 2015) is still being sold to unsuspecting US buyers, at only a slight discount:
The "old" model NW280AA goes for about $125 but it's no bargain if you want any of the above features. The newer HP Prime model reviewed here (G8X92AA) typically retails for about 150ドル or 160ドル.
The two models look absolutely identical. The proper model numbers appear only on the back of retail packages; not on the units themselves (there may also be a sicker in the front, stating "Wireless Kit Compatible").
Otherwise, the only easy way to tell what model you hold is to check the "About HP Prime" page displayed by the calculator itself. To do so, press the "Help" key on the top row, then touch the first soft-key (called "Tree") and tap the first topic (entitled "About HP Prime"). Here's what appears on my own machine at this writing:
HP Prime Graphing Calculator Software Version 2015 6 17 (8151) Hardware Version: C CAS Version: 1.1.2-11 Serial Number: 7CD5130LME Operating System: V0.037.526 © 2015 Hewlett-Packard Development Company, L.P.
Only the "hardware version" is critical: "C" is OK; "A" and "B" are not.
The above also identifies precisely the calculator model reviewed here.
If/when HP's future firmware updates fix the problems reported here,
the corresponding text will be edited (削除) or struck-through (削除ここまで).
In November 2014, CR Haeger coined the following mnemonic: NW280AA = No Way, G8X92AA = Great.
When a new HP Prime is powered up for the first time, it forces you to choose a certain number of parameters: The current time and date, your preferred language, number format and date format (unfortunately, proper ISO 8601 with hyphens isn't available).
The language used to present you with those choices is set at the factory (it was English in my unit). If you can't understand what you're asked for, just make some guess and proceed. As soon as you're out of the initial setup, you can make the calculator speak your language by pushing the (blue) shift key followed by the "home" key (first column, second row). Tap the box at the bottom of the screen and a list of languages will appear. Tap the one you like best. One way to validate that choice is to push the "home" key again.
Whenever you wish to modify the calculator's basic settings, just conjure up the "Home Settings" menu by pushing the (blue) shift key followed by the "Home" key as above. That menu consists of four pages which are accessed sequentially by taping the large rectangle at the bottom of the touch-screen.
One good thing to do at this point is to give your calculator a unique name by modifying the second box of the second page of the aforementioned "Home settings". Otherwise the calculator's name would default to "HP Prime", which could create problems later on, because several calculators with the same name shouldn't coexist in a network (wireless or not).
A second set of settings pertains to the built-in Computer Algebra System (CAS). It consists of two pages accessed by pushing the (blue) shift key followed by the "CAS" key (last column, second row). Some parameters, like the choice between degrees and radians, are common to both sets and can be modified either way.
There are 4 selectable levels of display brightness. You change the level by pressing "On" and pushing either "-" or "+" according to taste. (This method is reminiscent of the contrast adjustment of black-and-white LCD screens.)
I find the second-highest level most pleasing.
The key to a comfortable learning experience is the ability to recover from a mess, big or small, Here's how to do that. (See also: purging variables.)
Even a "minor" factory reset can be very drastic: It erases the calculator's entire memory and resets every option back to factory setting except the calculator's name, the time, date, calendrical format and choice of language. (The exam-mode set by the teacher in a classroom network is also indestructible, for the teacher-prescribed duration at least.)
BUG : (2015年11月26日) The language which expresses the second type of exam-mode configuration (top box in the third page of the home setup menu) remains expressed in whatever language was preferred at the time of the last reset. For example, it will read "Examen personalisé" instead of "Custom Mode" if your chosen language is English but was French at the time you last reset your calculator. If this bothers you, you have to do a reset whenever you switch your language preference.
Step-by-step to upgrading your HP Prime ROM
(EduCalc, 2015年07月17日).
HP Prime diagnostic mode (EduCalc, 2014年01月17日).
To make a wireless network in the classroom, you must use a kit consisting of 30 dongles (one per student) and a base antenna for the teacher's PC. In a noisy 2.4 GHz environment, the usable range (from the base) is about 40 m (it's 60 m line-of-sight). The whole thing retails for about $600 (compared to 3000ドル for the TI equivalent).
The software to install on the PC is the same as what's used to manage a USB wired network (also crucial for downloading software updates to a single calculator via the PC's Internet connection). To the best of my knowledge, that software is only available for Windows.
It's been reported that the teacher units and student dongles are functionally identical, which would make it possible to establish a wireless link over short distances (on the same desk, say) by rigging the PC with a dongle instead of the proper long-range antenna.
Instead of Bluetooth or Wifi, HP chose to use the basic 2.4 GHz wireless technology typically employed for remote keyboards and mice, which is much simpler to setup.
An obvious flaw of the current design is that you can't recharge the battery of a calculator while the networking dongle is in place.
Until HP addresses this issue by providing at least a few dongles in each kit with a charging connector, a teacher could keep a few fully-charged spare batteries on hand.
I haven't experimented with the above hardware myself and I haven't located anybody who has. So, I am unable to comment any further...
Video presentation
by Tim Wessman (HCC 2013).
|
Video Promotion (2014).
HP Connectivity Kit User Guide, second edition (March 2014).
HP Prime Wireless Kit:
Base for teacher's PC (windows) and 30 student dongles
[ Specs, 2014年07月20日 ]
Both units accept all data-acquisition Fourier probes. However, the internal hardware of the SS400 and SS410 are totally different. Reportedly:
The SS400 is simpler. It uses a board made by HP. It allows each sampling probe to send data as fast at it can (up to 40k/s or 50k/s). The unit signals when a probe is removed mid-stream. However, it will mis-identify a probe at times. It uses 9V batteries. It's not supported by the HP Prime.
The SS410 uses a board made by Fourier. All probes sample at the same rate, determined by the slowest one (up to 22k/s or 35k/s). Probes are rarely misidentified but the removal of a probe during streaming is not detected. The unit is powered by NiCd batteries recharged by the USB port.
Speaking unofficially, Tim Wessman, of the HP calculator group, said that the HP-50G support software for the SS410 was never publicly released, due to lack of interest. It seems to be floating around, though.
The exact communication protocols are kept secret and the support software is closed-sourced. Typically, a given calculator will accommodate one model but not both. The trend seems to be that those units are sold as a package with a compatible calculator, to avoid mismatch issues. It seems that both units still present separate sets of problems.
Few retailers stock the HP StreamSmart, but it can be backordered.
The Museum of HP Calculators (forum)
March 2013 |
April 2014 |
Aug. 2014 |
April 2015
HP StreamSmart 400 User Guide
for HP 39gs or HP 40gs (2008)
HP MCL kits (2011) SS410 + HP 39gs :
Starter (2 cables, 5 probes)
|
Advanced (2 cables, 10 probes)
Video: HP 39gs graphing calculator with StreamSmart 400 (HP Mobile Calculating Lab)
HP StreamSmart 410 for HP Prime (G8X92AA) :
Datasheet (Oct. 2014) &
User Guide (June 2013).
The Calculator Store
|
EduCalc
The only easy hardware upgrade increases the HP Prime's autonomy 40% (without voiding the warranty) by replacing the supplied battery with a lithium-ion battery designed for the Samsung Galaxy S3 smartphone. (Those batteries are affordable, and the optional compatible chargers are dirt cheap.) Carrying a fully-charged spare and a small screwdriver will also ensure that you'll never have to face a flat battery in the field.
Get only the normal-sized replacement batteries with a typical nominal capacity between 2100 mAh and 2300 mAh. Higher-capacity units are too thick for the battery compartment of an unmodifed HP Prime.
The most prominent unused feature on the HP Prime main board is a polarized pair of solder pads ("+" and "-") labeled "BUZZ100", meant to hook up to a piezzo beeper. However, this is of no help without any firmware support... This undocumented possibility has been noticed by many people but nobody seems to have seriously investigated it (yet).
Other people have also noticed pads labeled SCK and SDA, which may suggest a synchronous serial bus (similar to I2C). That could bring about terrific functionality, but it's utterly useless without firmware support.
Hewlett-Packard won't facilitate HP Prime hacks, because they seem afraid that might eventually compromise teacher's privileges in exam mode.
Apparently, it's quite possible to flash a new unrestricted operating system into the HP Prime for some specialized usage (taking advantage of the capabilities of this machine, which is the most powerful calculator on the market today). So far, this possibilty has caught the attention of at least two people: Lionel Debroux and a young Frenchman known as Critor TI.
Most recently (2015年12月15日) Jean-Baptiste Boric has made available some experimental third-party firmware which dabbles with the HP Prime's unconnected serial port...
Silicium (2013)
|
Let's hack the HP Prime! (Omnimaga, 2013).
|
HP Prime hardware (MoHPC, 2014)
Wiki
|
HP Prime
Calculator reverse engineering by Erwin Ried (PrimeComm 0.9 b21, 2014年04月28日).
The HP Prime actually has three separate workspaces side-by-side, but someone who sticks with one data-entry mode will only see two of them.
Nevertheless, a user who keeps changing between ordinary data-entry and RPN (for non-CAS operations) will soon discover that RPN operations are performed on a separate stack which is different from the "history" associated with regular data entry (either "Algebraic" or "Textbook"). One key conceptual difference is that the RPN stack is a two-way pushdown storage with a possibility for random read-write access, whereas the "history" of regular data entry is just that, namely a chronological record of the last results obtained. Unlike the RPN stack, that history is read-only and can only be accessed by highlighting and copying an entry manually. In practice, the data corresponding to one data-entry mode is hidden when you switch to the other mode. It will be accessible again when you switch back.
The two workspaces are separate but you can cut-and-paste between them and they share the values of all variables. However, if the evaluation of a variable involves a literal it will cause a puzzling "Syntax error" if you attempt to evaluate it in the "Home" mode.
In CAS mode, a variable can normally store anything you wish. However, a few predefined variables available in both modes can only hold certain predetermined types of values readable from the "Home" mode.
WARNING : There are also 18 capitalized "system and settings" variables which control the calculator's behavior. Unfortunately, there's nothing special about their names to warn you that using them as general-purpose variables could yield unexpected results and/or seriously mess up the machine. Those variables are: Date, Time, Language, Notes, Programs, TOff, Theme, HVars, DelHVars, HAngle, HFormat, HSeparator, HDigit, HComplex, Entry, Base, Bits, Sign.
The first time you try to store a value in a variable outside of the above list from the "Home" mode, you'll be asked for a confirmation that you really want to "create" a new variable. No such confirmation will be requested in the CAS mode. Once a variable is so "created", its value is available in either mode (unless it involves literals, disallowed in "Home").
To return a user-created variable (with an assigned value) to its pristine status of a pure literal (an unknown variable) just use the function purge. Example: purge(a)
Unlike predefined variables, user-created variables can hold any type of value. (They're called CAS-variables in HP's documentation.) The types of their values can change from one assignment to the next.
BUG : (2016年01月06日) So-called implicit multiplications are supported only in the "Home" mode. They give erratic results, without an error message, in CAS. For example, the following expression correctly evaluates to 300 in the "Home" mode:
(1 + 2) (3+7)2
In "CAS" mode however, this input gets displayed as 1+2(3+7)2 gets parsed as ((1+2)(3+7))^2 and evaluates to 9. As Pauli was fond of saying: Not even wrong! If you ever forget to make all multiplications explicit, you will be sorry. You must spell out:
(1 + 2)*(3+7)2
CAS
commands in Home mode, by Edward W. Shore (2013, 2014).
Video Tutorial by Eddie Shore:
Numeric
and Symbolic Derivatives on the HP Prime (2014).
One shortcoming of this approach, duly documented by HP, is that "deep" results (anything beyond what Ans can fetch) can only be grabbed by feeding some previous input/output back into the input parser.
BUG : (2015年12月28日) This design is neither robust nor accurate. It fails when pretty-printed expression are not properly vetted for the "textbook" data-entry mode. For example, with the "textbook" data-entry selected, enter the following equation in the "Advanced Graphing" app:
Everything is fine until you try to edit that (even if all you do is change the right-hand-side) in which case you'll end up with something like:
The problem is that the two-dimensional output routines are flawed: They wrongly consider that a fraction bar has sufficient priority to make surrounding parentheses useless when the whole thing is raised to a power. So, a much-needed pair of parentheses is dropped!
If you use "textbook" data entry, to edit the displayed expression, the corrupted data is used as input and you're in trouble. With regular one-line entry, you get to work with the correct original expression (the flawed display is ignored) and everything works fine, although it looks bad!
The great paradigm behind computational RPN is that everything operates on a stack of objects. Any action consumes a certain number of the topmost objects from the stack and returns a certain number of results to the stack.
For the counterparts of ordinary functions, the number of objects fetched from the stack is a fixed number of arguments and only one object (the "result") is returned to the stack. However, an RPN calculator has the added flexibility of procedures that can return several results to the stack.
[画像: Come back later, we're still working on this one... ]
In RPN mode, it's essential to deal only with functions which have a fixed number of arguments. To allow CAS functions with a variable number of arguments to be used in RPN mode, they are invoked with the chosen number of arguments indicated beween parentheses.
For example, to use the 4-argument summation-function you invoke: CAS.sum(4) after putting the 4 needed arguments on the stack. Note that the first two arguments of the CAS.sum function must be symbolic expressions. (The second one must be the name of a pre-declared numeric variable and the first one some algebraic expression involving that variable.)
Symbolic expressions are legitimate objects in either mode. They can be entered surrounded by a pair of single quotes (obtained from the keyboard by shifting the parentheses key).
Thus, in RPN mode, here's how to get the sum of all integers from 1 to 100:
'N' Enter 'N' Enter 1 Enter 100 Enter CAS.sum(4) Enter
That result (5050) was famously obtained by the young Carl Friedrich Gauss (at the age of 7) with just one addition and one multiplication! (HINT: 50 pairs of addends are involved, which all add up to 101.)
Videos : HP Prime RPN Mode Tutorial by Edward Shore : Basics | Advanced functions
Among other benefits, this approach allows the programmer to use a limited vocabulary to handle many situations which are mathematically similar.
A function of two arguments (or "input variables" in HP parlance) is said to be distributive with respect to one argument when it accepts a vectorial quantity as the other argument and returns a like vector consisting of the results obtained by executing the elementary function on the components of the vector and the "distributed" argument (in the proper order).
For example, the function irem( <quantity> , <modulus> ) is right-distributive (i.e., the modulus can get distributed). Thus, if you have a matrix and want the matrix consisting of the remainders of all its components when divided by the modulus, a single function-call will do...
[画像: Come back later, we're still working on this one... ]
Wikipedia : Distributivity | Tensor products | Object-oriented programming
"Derive" and the original TI-92. TI-89, Voyage and TI-nSpire CX CAS. ... ...
Casio Class Pad II, FX-CP400. ... ...
Integers up to 2589 digits (8599 bits).
The HP Prime's CAS calculator is based on the open-source xCas / Giac computer algebra system developed by Bernard Parisse and first released in 2000.
[画像: Come back later, we're still working on this one... ]
I could live with the lack of RPN data-entry in CAS mode if HP would only provide a function (usable in expressions) for deep read-only access to the history of results (like their competitors do). At this writing however, expressions like Ans(2) or Ans(3) behave just like plain Ans on the Prime. All of those just return the last result in history. It's nice when a calculator can give you the next term of a recursively-defined sequence in a single keystroke, isn't it? For example, consider that repeatedly evaluating the following expression should walk you through the Fibonacci sequence... Too bad it doesn't.
Ans(1) + Ans(2)
Without this versatile feature, it's difficult to fall in love with the HP Prime. At this time, history (unlike the RPN stack) is simply a record of what has been printed recently, with whatever loss of precision the output process entailed (if you've set your calculator to output numbers with fewer than the nominal 12-digit accuracy). Besides that loss of precision, there are also issues of robustness because whatever the system outputs is not always quite ready for input "as is".
HP Prime (in French) by Renée De Graeve | Xcas / Giac, by Bernard Parisse.
Like many advanced modern calculators, the HP Prime features several packaged applications ("apps") which solve specialized problems in particular domains with an easy "fill in the blanks" approach. Most apps can't talk to each other except via the clipboard (cut-and-paste).
However, this rule has welcome exceptions through the sharing of variables. For example, the Spreadsheet app could include cell formulas like =U or =V to refer to the values of the solutions in U and V obtained by solving equations with the Solve app.
There are usually three different ways to view a given app: Symbolic definitions, Graphical plot and Numerical results. You switch between those views by pressing one of the three topmost black keys in the second column.
In the HP Prime, the 18 different built-in apps are grouped in classes indicated by the dominant color of their icons in the Application Library.
Blue icons are used to denote extremely easy-to-use graphical applications following the same pattern: In each of them, the black "Symb" key is used to define symbolically up to 10 plots in an intuitive way. The resulting picture can then be viewed by pushing the "Plot" key.
The plots drawn by an app appear on a screen dedicated to that app. Unfortunately, there's no easy way to put on the same screen two plots generated by two of the five different built-in blue apps:
The fourth key on the first white row (labeled "x t q n") is a typing aid standing for the main parameter in any of the above (respectively x, x, t, q and n). When another app is active (as advertised by the screen's blue header) this key stands for whatever the "main" variable of the app is (in UPPER case for the "Home" mode, in lower-case for the CAS mode).
To create several spreadsheets, you simply duplicate and rename the standard spreadsheet app. Each instance can handle a different data set.
The same method can be used with any of the above applications to work back and forth with separate data sets.
As discussed below, duplication is also the first step in the easiest way to create a new app. To do so, duplicate an existing app which is not too different from what you have in mind and then modify the procedures associated with your new copy.
To duplicate an app, you just highlight its icon in the "Application Library" and tap "Save" (the first soft-key). You're then prompted for a new name to give the the copy. Tap OK and you're done.
Videos :
Technology in College Algebra:
Basic Graphing - HP Prime by
David Hayes (March 2014).
Apps as working environments
Pushing the "Define" key (that's the aforementioned "x t q n" key shifted) will bring up a two-box dialog screen...
In the top box, give your function a name, then tap OK.
The only caveat is that you cannot choose for your function a name which is otherwise used for a built-in feature (this would cause a potentially puzzling "Invalid input" error message). Invalid names include built-in functions, active variables and whatever is preempted by apps for their own objects: F1, F2, ... F9, F0, U1, U2, etc.
If you've previously defined a function by that name, the old definition will then appear (in which case you can tap "Edit" to modify it). Otherwise, just type a new definition in the bottom box.
You're expected to enter a definition consisting of an algebraic expression involving some variables acceptable in Home mode. Once you're done editing or entering such a definition, tap OK and the all the variables you used will appear with associated checkboxes. The variables that are checked will be the input arguments of your function, in alphabetical order. (In RPN mode, the values of the arguments are taken from the stack, deepest first.)
Unchecked variables will be considered global variables whose values are determined by whatever environment the function is called from. Unless your function is used as a subfunction of something else, this environment is just a combination of the explicit assignments you made and of the assignments made for you by the active app (always identified on the screen's blue header).
Once a function is so defined, it will automatically appear in a deep user menu, which is accessible by pushing the "Toolbox" key, taping the "User" soft-key if needed, and select "User Functions". This method is so cumbersome that you may prefer to simply type the name of your function letter by letter...
To save time when you need to use your own function(s) a lot, you really only have two options:
Functions should be designed to suffer from as few exceptions as possible. If your function has limited applicability, you must somehow document that and warn all its potential users (including your future self).
Better yet, design your functions so that they can handle by themselves as many "exceptional" cases as possible. Design a function defensively in order to avoid complicated "instructions for use".
In the case of functions defined by a single algebraic expression, it's very useful to know that such an expression is allowed to contain "conditional expressions" consisting of a test and a pair of expressions (the first one is used when the evaluated test is true, the second one when the test is false).
when ( <test> , <value if true> , <value if false> )
(1-x) S = a ( 1 - xn )
For the sake of simplicity, the scaling factor a is often omitted (in other words, we only consider progressions starting with 1). If x=1, then the solution is trivially S=n (sum of n terms equal to 1). Otherwise, we divide our last equation by (1-x) to obtain a classic formula giving the sum of the first n terms of a geometric progression of ratio x starting with 1 :
As previously noted, that formula doesn't apply to x = 1 (in which case the result is simply n).
Furthermore, we must make sure that our implementation always gives:
As we shall soon re-discover, the latter is strongly tied to the fundamental fact that the zeroth power of any quantity (including 0 or, more generally, any noninvertible element) is always the neutral element of multiplication, whenever there is such a thing.
Now, as we wish to make the number of terms (n) the second argument of a two-argument user-defined function called FOO, we'll use the variable Y for it (simply because Y comes after X alphabetically).
Since quick functions are meant for the "Home" mode, you can only use pre-declared variables in them (mostly, single uppercase letters).
Our final robust definition involves two nested conditional expressions :
when( Y=0, 0, when( X=1, Y, (1-X^Y) / (1-X) ))
The outermost conditional is needed to properly evaluate FOO(0,0) because of the unfortunate fact that the HP Prime calculator won't evaluate 00
Mathematically, the fact that this 00 is equal to 1 makes our general formula correctly evaluate to zero for any empty sum, even for a zero common ratio. That's not just a matter of convention: The nature of a sequence is totally irrelevant to a sum formed from none of its terms.
The above provides an analytic continuation of the function beyond its original intend, as long as xy is well-defined (a tricky question).
The difference between Hell and a happy programming life
is the proper handling of special cases.
Some programming languages ignore the very concept of a command; they are entirely based on evaluating expressions which can be either elementary or functions of other expressions (LISP is the oldest example). The HP Prime is not meant to be programmed this way (it's native programming language, PPL is an imperative language whose backbone consists of assignments and commands). However, some provided functional constructs can extend the usefulness of the quick definitions discussed here.
One of the most important ones for this style of programming is the instantiation bar (obtained by taping the third box in the first line of the rectangle which comes up when you press the key to the right of the blackened toolbox white key). For example, you may obtain the Wendt determinant of order 5 as:
resultant(x^n-1,(x+1)^n-1) | n=5
One advantage is that you may get the same thing for any order by only editing the end of that line. No need to give a name to that function if you only intend to experiment with it a few times.
Note that the above method performs the indicated substitution on the input expression before they are evaluated. In some cases, you want to perform sustitutions on the final evaluated results instead. Compare the following expressions:
laguerre(3) | a=0 subst(laguerre(3),a=0)
The first of those does absolutely nothing because the variable a is simply not present in the unevaluated expression. The second one does eliminate the variable a from the resulting two-variable Laguerre polynonomial (where x and a occur).
Other constructs have mandatory dummy variables built-in. This includes sums, products and lists obtained with functions of 4 or 5 arguments:
sum( <expr> , <var> , <start> , <finish> [ ,<step>] ) product( <expr> , <var> , <start> , <finish> [ ,<step>] ) MAKELIST( <expr> , <var> , <start> , <finish> [ ,<step>] )
For example, we may define the user-function BAR to evaluate the factorial of a nonnegative integer with the following definition, consisting of a single expression (uncheck the dummy variable Y, since it's not meant to be an argument of BAR).
product( Y , Y , 1 , X )
Failing to uncheck the box corresponding to Y would effectively create a function of two arguments which would cause a "Syntax error" when any attempt is made to use it with a single argument. In RPN mode, this bug would always cause the removal of an extra stack element.
Executing BAR won't change the global values of X and Y, since X is local to BAR (as its argument) while Y is local to the "product" construct.
Note that BAR(0) will correctly evaluate to 1, because the HP Prime does know that an empty product is equal to 1. Using this fact, we may as well use the following definition, which is very slightly more efficient (it avoids multiplying 1 by 2) and still correctly evaluates BAR(0) and BAR(1):
product( Y , Y , 2 , X )
In some other cases, you can't pick the names of your dummy variables. One notable example is the MAKEMAT function, which creates a matrix from an expression of the individual elements, depending on the index I of the line and the index J of the column (both starting at 1). Thus, the following expression gives the Wendt matrix of order 5 (whose determinant we've already mentioned).
MAKEMAT(COMB(N,ABS(I-J))),N,N) | N=5
BUG : (2015年12月16日) In the above case, the HP Prime shouldn't even offer the possibility of making Y an argument to the BAR function, since it's not used at all in the definition (the name Y is just a dummy variable for use inside the "product" construct only; it's not an external parameter).
The same remark applies to functions whose dummy variables have a predefined name and range. This includes the (capitalized) variables I and J which range from 1 to the number of lines or columns (respectively) for functions which handle matrices one element at a time. For example, the following definition yields a function of N which creates the circulant Wendt matrix of order N.
makemat(comb(N,abs(I-J),N,N)
In this, N is the only argument (check the corresponding box). The variables I and J are dummy variables within makemat and shouldn't even be offered as possible arguments of the function. Until HP fixes this bug, you MUST uncheck their boxes yourself.
For the record, the HP Prime offers a simpler way to compute Wendt's determinant without actually building the above matrix.
To take full advantage of this calculator, you have to go beyond what can be done with the single algebraic expressions which serve as definitions for the user functions described in the previous section. For this, you must become familiar with at least part of the provided programming language.
HP PPL is a Pascal-like language similar to what's used in the successors of the HP-38G. It's unrelated to the stack-based RPL used in the HP-50G.
[画像: Come back later, we're still working on this one... ]
My
first HP PPL Program by Michael de Estrada (Oct. 2013).
My
Favorite HP Prime Functions by Namir Shammas (2013).
HP PPL Tutorial, by Edward W. Shore :
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
Videos :
How to program the HP-Prime, by rs1n :
Hello World
|
Newton's method (1,
2,
3)
Tutorials by Edward Shore:
INPUT |
STRING...
Programming the Same Task:
HP-41, HP-71B, HP 50g, HP Prime by Joe Horn (HHC 2014).
Standard apps can't take advantage of the very large integers of the CAS package. Thus, the built-in "Sequence" app can't properly analyze integer sequences. For example, try this definition "as is":
U1(N) = (1+9N3)3 + (9N4)3 - (3N+9N4)3
You'll "find" that this sequence is constant until N = 5, after which point something goes badly wrong...
Well, the ordinary "Home" mode of the HP Prime will convert integers of more than 12 digits to floating-point approximations. The resulting loss of precision when you subtract nearly-equal integers beyond that limit is what messes up the above computation.
When you suspect this kind of problem but expect the final result to be a nonnegative integer of 12 or fewer digits, you may arrange intermediate computations to be performed using the much larger precision of the HP Prime's CAS. For example, you may replace the above by:
U1(N) = CAS.irem((1+9N3)3 + (9N4)3)
This will fix the issue until the CAS itself fails (beyond N = 32767).
[画像: Come back later, we're still working on this one... ]
The icon used by an app in the Application Library can be customized by putting a proper picture (39 x 39 pixels) in the associated file named "icon.png". The files associated with an app are accessed with the multi-purpose functions AFiles and AFilesB.
Unfortunately, some conversions fail at high-precision (as analyzed below).
A very nice feature of the HP Prime is that it recognizes all 20 official metric prefixes (using a nonstandard capital "D" instead of "da" for deca-). For example, the above units do not include the kilogram-force but the _kgf is still a valid unit as a standard multiple of the lesser used gram-force (_gf) which is duly declared as one of the seven primary units of force.
Metric prefixes are also recognized in combination with non-metric units (please refrain from using this dubious possibility).
Blank entries in grey indicate conversions not supported by the Prime.
The numbers highlighted in green are exact conversion factors ( de jure ) often butchered elsewhere... Kudos to HP! There's something magical about the Prime's 12-digit accuracy, which is precisely what's needed to quote the exact legal conversion factors for the poundal, the pound-force, the Btu and the mmHg. HP missed the mark about this last unit by making the usual mistake of confusing the mmHg with the Torr (a mmHg is actually a little bit more than a Torr). They didn't properly capitalize "Torr".
Although the horsepower (hp) has a legal definition which translates into an exact conversion factor requiring even more precision (17 digits) every engineer is fully satisfied with the excellent approximation of 745.7 W/hp.
Numbers would be highlighted in yellow if they were needlessly inaccurate, because of a rounding error near the limit of the calculator's nominal precision (12 digits). I saw no such problems in the HP Prime. Nice
The numbers highlighted in red are incorrect. Such values may be inconsistent with correct data provided by the calculator itself. Examples:
The HP Prime's erroneous value for the parsec (pc) is inconsistent with the conversion factor of 149597870700 m/au which embodies the modern (2012) definition of the astronomical unit. The geometrical definition of the parsec (pc) implies that:
1 pc = ( 648000 / p ) au = 30856775814913672.789139... m
Thus, the HP Prime's erroneous value of 3.08567705813 1016 should be changed to 3.08567758149 1016 . Apparently, a typo (an extra 0) was compounded with a two-unit mistake in what became the last digit. Bad.
From 1976 to 1985, the official British equivalence had been of 4.546092 L to the Imperial gallon. Thus, the fluid ounce was 28.413075 mL. That ended when the British aligned themselves with the Canadian equivalences of 4.54609 L and 28.4130265 mL respectively. HP duly updated the former but not the latter. Hence their inconsistent conversion factors.
Elsewhere, I've already said that the equivalences of 4.54608 L and 28.413 mL should have been enacted at the time of that final unification (to avoid a silly 9-digit conversion factor for the ounce).
Since 1959, the inch of water (inH2O) has been a proper unit of pressure which doesn't depend on the properties of water at any particular temperature. Its value is obtained by multiplying a depth of one inch (1959) and a standard gravitational field (1901) into Guillaume's conventional density of water (1904). That's to say:
(0.0254 m) (9.80665 m/s2) (999.972 kg/m3) = 249.08193551052 Pa
4.184 J to the calorie has been the internationally accepted conversion factor since 1935. HP's exclusive use of the IST "definition" since the days of the HP-28S is clearly misguided.
BUG : (2015年12月02日) Something's very wrong with the luminous units. From the 8 luminous units supported by the HP-50G (_fc _flam _lx _ph _sb _lm _cd _lam) only two survive in the Prime's "Light" menu (_cd and _flam). Feeding either of them to the MKSA function makes the system crash (possibly because the candela is one of the 3 independent SI units which supplement the incomplete MKSA system, but that's no excuse).
Those constants are limited to what's encountered at the high-school level. Even much cheaper calculators are usually far less stingy.
The MAXREAL and MINREAL are the largest and smallest positive numbers which can be represented by a floating-point number in the current environment. They are programming parameters, not constants of nature.
The following table compares the HP Prime's built-in values to the latest recommended value at the time of this writing (from CODATA 2014). The links provided will give fresher values if you follow them after the next CODATA update (CODATA 2018 is expected to be released in 2019).
About the last entry: Stefan's constant was 5.670373(21) 10-8 W/m2/K4 in CODATA 2010 (as duly listed at the top of the HP Prime's "Physics" menu) . Indeed, that value is consistent with what can be computed from other predefined HP Prime values (up to expected rounding errors):
s = 2 p5 k4 / (15 h3 c2 ) = 5.6703726226 10-8 W/m2/K4
Likewise, the updated value is consistent with the rest of CODATA 2014 :
s = 5.670367(13) 10-8 W/m2/K4
As disembodied numbers (without physical units attached to them) the quantities listed above would be meaningless. At the very least, HP should have indicated the proper units after the numbers quoted in their menus. Ideally, it would be nice, in a future revision, to be able to fetch a quantity with its unit by taping the unit rather than the numeric part.
As its name implies, the atomic mass unit (abbreviated u, amu or D) can be used as a unit and HP duly allows that. Arguably, it's also a measured constant tied to other fundamental constants and it would deserve to be directly accessible as such in one (or both) of the "Chemistry" and "Quantum" catalogs of constants. A similar case could be made for the Faraday constant , which HP only recognizes as a unit although, arguably, it also deserves a rightful place among "Chemistry" constants.
StdP is a poor way to call the "Normal pressure" of 101325 Pa which precisely departs from "Standard" conditions (STP). The two acronyms for "Standard Temperature and Pressure" and "Normal Temperature and Pressure" are common in the literature:
The latter has been dominant historically and HP chose it (unlike Casio) for the value of the molar volume in the above list. However, students may encounter either convention and must be able to handle them both.
BUG : (2015年12月03日) The two quantities just mentioned ( normal pressure and normal molar volume ) are not properly listed in terms of standard (unprefixed) SI units, which are mandatory in a computerized list without explicit units! Both listed numbers are off by a factor of 1000.
HP-35s Constants | Casio Constants | Texas-Instruments Constants
A list consists of any number of elements, surrounded by curly brackets. A matching pair of curly bracket is obtained by blue-shifting the "8" key.
List-related functions are available in a menu obtained by pushing the "Toolbox" blackened key (second among the white keys) taping "Math" and selecting the sixth option ("List").
An element of a list can be anything, including another list. For lack of a built-in constructor that would make a list L0 from its first element x and its tail L1 (what LISP aficionados would recognize as the fundamental CONS function) HP Prime users must invoke something like:
concat({x},L1)
In this, L1 must be a list (possibly an empty one). We can't drop the curly brackets around the CAS-variable x, since its value might be a list.
If L0 is the result of the above, it's easy to retrieve its first element x as L0(1) (that would be the CAR of L0 in LISP). On the other hand, there's no way to retrieve the "tail" L1 of L0 (L1 would simply be the CDR of L0 in LISP) with any combination of the built-in functions except through a wasteful duplication of the whole structure, through something like:
when(size(L0)<2,{},makelist(l0(i),i,2,size(l0)))
Arguably, that flaw makes the HP Prime fundamentally incomplete for list-processing. By contrast, the mere existence of CONS, CAR and CDR makes LISP complete. A common practice in LISP is to go through a list of n elements by looking at the first elements of its successive tails. It would be a bad idea to do that on the HP Prime with the above code (the running time would be proportional to n2 ).
BUG : (2015年12月16日) The name MAKELIST must be typed, one letter at a time, in UPPER-case. If the name is fetched from the "List" submenu or the general catalog, then it appears first in lowercase and gets the appearance of uppercase upon evaluation but evaluates erratically in CAS mode (OK in "Home" mode). Furthermore, the lowercase is restored when the text of the evaluated expression is cut-and-pasted. The same on-the-fly conversion happens to many other functions (including "size", for example) with no problems. At this point in my review, a problem has only be observed with the MAKELIST function, but there could be others. Prudence would thus dictate to only use the "native" case of any built-in function (although poor technical documentation makes it difficult to do so).
MoHPC forum: Linear vector spaces | Programming with lists
One easy way to enter a specific matrix by hand is to edit the value of one of the 10 predefined matrix variables. To do so, push the shifted "4" key and tap your choice of matrix to edit in the menu that comes up (showing the memory space currently occupied by each one).
In the HP Prime, a univariate polynomial is either a special type of algebraic expression or the vector formed by its coefficients.
The "Increasing" checkbox (the last box on the first page of the CAS settings, accessed by shifting the CAS key) affects only the way symbolic expressions are displayed:
That flag has no effect on the vectorial representation, which always follows the former ordering (higher powers first). Although HP may have made the wrong choice there, at least it's a firm one. (It would have been catastrophic to have the internal representation of polynomials vary according to the setting of some user-modifiable flag.)
Incidentally, the Cauchy product of two polynomials in vector form gives the same vector independently of the choice of ordering. Unfortunately, this fundamental operation seems unavailable directly on the HP Prime (apparently, you must convert both factors to symbolic form, multiply those together and convert the result back to vector form).
The functions that convert between the two types of representations are exemplified
below (the first two being completely synonymous):
coeff(x^6-1) == [1 0 0 0 0 0 -1]
symb2poly(x^6-1) == [1 0 0 0 0 0 -1]
poly2symb([1 0 0 0 0 0 -1]) == x6-1
When they return a symbolic expression, polynomial functions may not always do so in the simplest form. Example:
Lagrange's Interpolating Polynomials
lagrange([1,2,3],[1,4,9]) == (x+1)*(x-1)+1 == x2
Lagrange polynomials are dubiously listed among "special" polynomials.
[画像: Come back later, we're still working on this one... ]
Special polynomials | Gröbner basis | Bruno Buchberger (1942-)
The yyyy.mmdd date format is inherited from Hewlett-Packard's financial calculators (at a time when every calculator object was a single number).
In the HP Prime, the system variable "Date" holds the current date in that format. Three other calendrical functions are provided:
DDAYS(d1,d2) DATEADD(d,n) DAYOFWEEK(d)
Today, my age in days is: DDAYS(1956.0329,Date)
1000 days from today, the date will be: DATEADD(Date,1000).
This is strictly limited to the standard Gregorian calendar. Any "date" below 1582.1015 is simply rejected as invalid...
A better approach would have been to use the proleptic Julian calendar for earlier dates. Contrary to popular belief, calendrical functions which extend this way into the distant past are not difficult to implement. Good implementations even make it trivial to specify a later date at which to switch from the Julian calendar to the Gregorian one, like most countries did. (Make that an optional parameter.)
Appealing as it may be, going beyond the Gregorian calendar is mostly an intellectual exercise. The Gregorian range won't be perceived as a limitation by almost all users.
[画像: Come back later, we're still working on this one... ]
Basic functions | Zeta function and Riemann's Hypothesis (1859).
The function GF is tersely mentioned in HP's documentation: GF(p,n) is just said ro "create" a Galois Field of characteristic p with q = pn elements. The integer p must be prime and n must be an integer greater than 1. This is equivalent to the single-argument call GF(q)...
The first time GF is called, the following criptic message appears:
Setting g as generator for Galois field k (auxiliary polynomial for addition representation v)
Assigning variables g and k
Now e.g. g^200+1 will build an element of k
The result returned is the value thus assigned to k (which takes the form of a 4-argument equivalent call to GF whose details are discussed below). To forget about the above "creation" just purge the variables g and k.
You may create several Galois fields... The second time around, the system will report that it has used gA and kA because g and k were no longer available. To give customized names to a Galois field and its declared generator, see below (advanced users may also build the field with a primitive polynomial different from the one provided by the calculator).
Once a finite field of order q = pn is so declared, each of its elements is simply a polynomial in g of degree n-1 or less with coefficients modulo p, represented by the p integers from (1-p)/2 to (p-1)/2). Such polynomials form a vector space over the field Z/pZ which is turned into a field by the special way gn is defined as a specific polynomial of degree n-1 or less.
The above is just the most convenient way to create a Galois Field on the HP Prime. When GF is called with one or two arguments, the calculator works out a suitable primitive polynomial of degree n and stores in the variable k a full (4-argument) call to GF which would have created that same field:
All polynomial expressions involving the declared generator g of a Galois field k are thereafter simplified according to the rules valid in k. is also indestructible, for the teacher-prescribed duration at least.)
BUG : (2015年12月19日) For some values of q = pn the HP Prime doesn't come up with an irreducible primitive polynomial at all. For example, according to our discussion of the topic elsewhere on this site, there are only two valid responses (modulo 3) to the call GF(9). Namely:
GF(3,v^2-v-1,[v k g],undef) or GF(3,v^2+v-1,[v k g],undef)
Instead, the HP Prime may sometimes return something nonsensical like:
(削除) GF(3,v^2,[v k g],undef) (削除ここまで)
The fact that different polynomials can be returned upon different calls with
the same arguments leads me to believe that the HP Prime simply guesses a polynomial,
then checks to see if it's irreducible and primitive
(using a flawed test, obviously).
It seems that few people have been using this exciting feature until now, possibly because it's so poorly documented. That may explain why such a crippling bug went unreported for so long...
Galois Fields | Detailed information for Galois Fields (HPCalc.org)
In the "Advanced Graphing" app, when the "plot" view is active, pressing the "Menu" key (next to the CAS key) brings a menu whose fourth option is called "Visit Plot Gallery".
This consists of a set of 28 different sets of inequalities which are plotted in real time as you scroll left or right (the first nine of those can also be accessed directly by pushing a numeral from "1" to "9").
By taping the "Save" soft-key when such a picture is displayed, you may save the corresponding set of inequalities as a separate app under the name of your choice. This new app may be edited to experiment with pictures generated by a slightly different set of inequalities.
This calculator is certainly much more interesting than most. With only a small engineering team behind this product, HP has put together a terrific machine. However, almost 3 years after the initial release, a full review is still made difficult by the lack of critical support documentation:
The 689-page online manual, first released in July 2015, frequently refers "for more details" to something they call the Prime Calculator User Guide which is probably the previous 610-page document released in July 2013. In particular, the only source of information on the calculator's list-processing functions is whatever the calculator itself displays when "Help" is pressed before calling a function. There's no easy way to know whether other list-processing functions exist beyond what's shown in the relevant menu (If that's not the case, the set of those primitives is arguably incomplete.)
My makeshift solution is to memorize the first column (AFLPQUY) and count from there. It's also good to know the bottom part of the last column (TX:;) with the lucky coincidence of "X" with multiplication. For completeness, the zero key stands for an empty pair of double quotes while "3" yields the # sign (like on QWERTY keyboards). I'll probably have to learn this again after some disuse.
Bugs and suggestions (Tricider)
Not applicable. All of the above does apply to the latest firmware update.