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).
(2015-11-19) Buyer's Guide:
NW280AA (= "A") vs. G8X92AA (= "C")
Originally, in 2013, the HP Prime didn't support wireless connectivity.
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:
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.
(2015-11-21) Initial Setup and Customizations
Modifying your original choice of options.
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.
Adjust Screen Brightness :
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.
Cancel, Delete, Clear or Reset :
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.)
"Esc" (cancel current action).
Backspace (delete previous character or top of result stack).
"Del" (delete current character or highlighted stack entry).
"On" (to cancel a whole line).
"Clear" (Shift + Esc) to clear a whole workspace (and history).
To restore the scale of a plot, tap "Menu", "Zoom", "Decimal".
To clear an app's previous data, highlight its icon and tap "Reset".
Reset calculator: Hold "Symb" down and push "On".
Quick minor factory reset: Holding "Apps" and "Esc", push "On".
Pin reset: Push the recessed button in the back, with a paper clip.
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.
(2015-11-20) Wireless Connectivity Kit (Rev. C)
Connect a PC with up to thirty
G8X92AA calculators.
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...
(2015-11-27) HP StreamSmart 400 and 410
Four-port data streamers capable of up to 5700 samples / s.
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 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.
Taming the HP Prime Graphing Calculator (Going
from Newbie to Expert, the Right Way)
(2015-11-23) HP Prime's juxtaposed workspaces:
Home and CAS.
It's like two distinct calculators sharing variables
and other resources.
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 left calculator (activated by pressing the black "Home" key
on the leftmost column) is a programmable scientific
calculator without a computer-algebra system.
In it, every literal variable has a modifiable value
involving only constants
(specified numbers, vectors, etc.).
(That value is zero by default for 27 predefined real variables.)
The right calculator (activated by pressing the "CAS" black key on
the rightmost column) is a CAS calculator,
where every unassigned variable simply
stands for an unknown literal (i.e., its own name).
The value assigned to a variable may involve unknown variables.
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.
Reals in A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,q.
Complex numbers in Z0, Z1, Z2, Z3, ... Z9.
Lists in L0, L1, L2, L3, ... L9.
Matrices in M0, M1, M2, M3, ... M9.
Graphics in G0, G1, G2, G3, ... G9.
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:
(2015-12-19) Read-write stack of objects vs. read-only historical record.
In non-RPN modes, the tape holds the 127 most recent printouts.
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:
(
X
)
2
-
(
Y
)
5
= 1
5
5
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:
X
2
-
Y
5
= 1
5
5
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!
(2015-12-05) Reverse Polish Notation is now just a data-entry method.
RPN is an option in the Home mode. It's not available in CAS mode.
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.
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.)
(2016-01-02) Object-Oriented Functions
They behave according to the types (or dimensions) of their arguments.
Among other benefits, this approach allows the programmer to use
a limited vocabulary to handle many situations which are mathematically similar.
Distributive Functions :
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...
(2015-11-23) Computer Algebra System (CAS)
The Prime's CAS is based on the
Xcas / Giac of Bernard Parisse.
"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.
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".
(2015-11-24) 18 Built-in Color-Coded Applications (Apps)
Each app has its own workspace and three different ways to view it.
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.
5 Blue Apps: Ways to plot curves (or staircases).
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:
Function y = f (x)
Advanced graphing (i.e., cartesian equations). f (x,y) = k.
Parametric x = f (t) and y = g (t)
Polar r = f (q)
Sequence (functions of the index and/or second-order recursions).
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).
3 Green Apps: Demonstrating elementary functions.
Linear Explorer Y = aX+b
Quadratic Explorer Y = a(X+h)2+v
Trigonometric Explorer Y = a * SIN( k * X - b ) + h
4 Purple Apps: Data analysis.
DataStreamer. Fetching real-world data with a 410 StreamSmart.
Spreadsheet. Table of up to 10000 rows and 676 columns.
Duplicating Apps :
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.
(2015-11-27) User-Defined Quick Functions
The easiest way to program the HP Prime for simple tasks.
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:
Give your function a single-letter name.
Reassign a key to make it execute your function.
If you want to stay out of "permanent user-mode" to retain the standard meaning
of all keys, this will make your custom function accessible in three keystrokes
only (shifted "Help" + your reassigned key).
However, this option involves a little bit of programming
which makes is outside the scope of section
(advertised as bypassing real programming).
Designing robust functions :
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> )
Example :
Sum of n terms in geometric progression.
Eudoxus of Cnidus 408-355 BC
Eudoxus (408-355 BC)
obtained a formula for the sum S of n terms
in a geometric progression of constant ratio x
by noting that most such terms also appear in x S :
S
=
a
+
a x
+
a x2
+
a x3
+
...
+
a xn-1
x S
=
a x
+
a x2
+
a x3
+
...
+
a xn-1
+
a xn
Subtracting the second equation from the first one,
most terms on the right-hand-side cancel and we obtain:
(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 :
1 + x +
x2 +
x3 + ... +
xn-1
= (1-xn ) / (1-x)
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).
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 difference between Hell and a happy programming life is the proper handling of special cases.
Functional Programming & Dummy Variables:
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:
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.
(2015-11-21) The HP Prime Programming Language (HP PPL)
The HP Prime interpreter is due to the Frenchman
Cyrille de Brebisson.
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.
Programming Environment :
Commands and Statements, Functions and Expressions :
(2015-11-20) Customized Apps
Creating a custom App for the HP Prime calculator.
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).
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.
Video Tutorial
Part 1 &
Part 2 by rs1n (Sept. 2013).
(2013-11-30) Physical Units.
(Full support of the 20 metric prefixes.)
A rich catalog of 167 named units, from the HP-28S legacy.
Unfortunately, some conversions fail at high-precision (as analyzed below).
20 units of length.
12 units of area.
23 units of volume.
5 units of time and one unit of frequency (Hz).
8 units of linear speed and 3 units of rotational speed.
4 units of linear acceleration, 1 unit of rotational acceleration.
7 units of planar angle. (No units of solid angle.)
3 units of viscosity.
7 units for ionizing radiation.
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).
Some HP Prime conversion factors, including questionable ones :
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.
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).
(2015-12-02) Constants of Nature in the HP Prime
2 mathematical constants. 23 physical constants (including
2 "units" ).
Those constants are limited to what's encountered at the high-school level.
Even much cheaper calculators are usually far less stingy.
Quantum: h, , q, me, qme, mp, mpme,
a, j
[ + u = amu = D ]
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.
In Home mode, those limits are respectively 10500 and 0.1500.
In CAS mode, they are 2.01024 and 0.51024
(1.8 10308
and 5.6 10-309 ).
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).
The experimental values used in the HP Prime are fromCODATA 2010.
The standard convention used here
is that the digits between parentheses at the end of
a measured quantity indicate its experimental uncertainty (one standard deviation)
expressed in units of the least significant digit.
Grey shading indicates lack of HP Prime support.
Values which are exact by definition are
highlighted in green .
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):
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:
STP: Temperature = 0°C (273.15 K). Pressure = 100000 Pa (1 bar).
NTP: Temperature = 0°C (273.15 K). Pressure = 101325 Pa (1 atm).
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.
(2015-12-16) Lists
A very flexible data-type, incompletely supported by the HP Prime.
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:
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).
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).
Cholesky reduction of a symmetrical real matrix cholesky([[1,2],[2,13]]) == [[1,0],[2,3]]
The current HP Prime implementation of this function supports only symmetrical real
matrices (instead of more general Hermitian
matrices).
If the argument is a matrix with negative eigenvalues,
then imaginary numbers
will appear on the diagonal of the result.
(2015-12-01) Polynomials
Algebraic manipulations of polynomials. Special polynomials.
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:
Decreasing order. Unchecked box (factory default).
Highest powers of the variable are shown first.
Preferred at the high-school level.
Increasing order. Checked box. Preferred in higher education and research.
The constant term and low powers are shown first.
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.
Special Polynomials :
Cyclotomic Polynomials cyclotomic(12) == [1 0 -1 0 1]
poly2symb(cyclotomic(12)) == x2*(x2-1)+1
== x4-x2+1
The cyclotomic polynomial of order n is defined as the unique irreducible
monic polynomial
with integer coefficients which divides xk-1
for k=n but not for any lesser value of k.
GCD of all the Coefficients in a Polynomial content(x^6*2*p/3+p/2) == p
WRONG! (Should be p/6.)
Although it's not possible (even in theory)
to factor out every possible irrational factor,
rational multiples of p, at the very least,
should be handled correctly. When the calculator fails to find a common factor,
the only sensible result would be zero (meaning "probably
incommensurable").
(2015-12-01) Dates and Built-in Calendrical Functions
A date is an 8-digit
decimal number: Year + Month/100 + Day/10000
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.
(2015-12-19) Galois Fields
A nearly-undocumented feature of the HP Prime calculator.
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
/p 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:
The first argument is the prime number p.
The second argument is the primitive monic polynomial of degree n
of which g is a root (coefficients are between 0 and p-1).
A vector (equal to [v k g] by default) consisting of three names:
The dummy variable (v) used in the second argument.
The variable (k, kA, kB, etc.) holding the field's parameters.
The field's formal generator. Normally g, possibly gA, gB, etc.
Undefined (undef).
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...
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.
(2015-11-27) Kudos and Likes. Gripes and Dislikes. Bug Reports.
Several open lists which will grow as this review progresses...
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.)
Kudos and Likes :
Sold with two USB cables and an AC adapter (to meet all needs).
Thin unit looks good. Color screen is beautiful. Keys feel great.
Touch-screen for soft-keys, scrolling, zooming and copying data.
Auto power-off (5 min.) when running on battery. Data is retained.
User-defined functions can be "exported" to behave just like built-in.
Redefined keys are active only in an easy-to-access "user mode".
Cut-and-paste clipboard retains the last five clips for future use.
Bad color choice for alphabetic key labels (A-Z and # : "" ;).
If dimly lit, light orange on white is unreadable and orange on grey is invisible.
Because of the consistent left/right placement of the labels on the keys,
there was no reason to use a pale color, which isn't even used
on the dark keys
(where blue labels also suffer from a lack of contrast, albeit less maddening).
If the orange paint was made darker to address this issue (anybody listening at HP?)
the needs of the color-blind could be met by painting a blue dot on the "Shift" key
at the same location as other blue labels...
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.
Catch-all "Syntax error" message is often not very helpful.
Lowercase "i" isn't available for indexing, in spite of a specific symbol
for the imaginary unit
(namely, i , obtained as Shift-2).
Why disallow a negative starting index in the
"Sequence" app?
Truncation to two decimals under "Finance" hides days from dates.