HP currently offers two
topoftheline graphing calculators.
The HP50G, reviewed elsewhere, remains most appealing to programmers,
in spite of a lowerresolution 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 HP38G in 1995).
(20151119) 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 softkey (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 struckthrough.
In November 2014,
CR Haeger coined the following mnemonic:
NW280AA = No Way, G8X92AA = Great.
(20151121) 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 touchscreen.
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 builtin
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 blackandwhite LCD screens.)
I find the secondhighest 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 exammode set by the teacher in a classroom network
is also indestructible, for the teacherprescribed duration at least.)
BUG : (20151126)
The language which
expresses the second type of exammode 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.
(20151120) 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 lineofsight).
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
longrange 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 fullycharged
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...
(20151127) HP StreamSmart 400 and 410
Fourport data streamers capable of up to 5700 samples / s.
Both units accept all dataacquisition
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 midstream.
However, it will misidentify 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 HP50G 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 closedsourced.
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 lithiumion battery designed for the
Samsung Galaxy S3 smartphone.
(Those batteries are affordable, and the optional compatible chargers are
dirt cheap.)
Carrying a fullycharged spare and a small screwdriver will also
ensure that you'll never have to face a flat battery in the field.
Get only the normalsized replacement batteries with a typical
nominal capacity between 2100 mAh and 2300 mAh.
Highercapacity 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.
HewlettPackard 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)
(20151123) 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 sidebyside,
but someone who sticks with one dataentry mode will only see two of them.
Nevertheless, a user who keeps changing between ordinary dataentry and RPN
(for nonCAS 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 twoway
pushdown storage with a possibility for random readwrite 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 readonly and can only be accessed
by highlighting and copying an entry manually.
In practice, the data corresponding to one dataentry 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 computeralgebra 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 cutandpaste 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 generalpurpose 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 usercreated 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, usercreated variables can hold any type of value.
(They're called CASvariables in HP's documentation.)
The types of their values can change from one assignment to the next.
BUG : (20160106)
Socalled 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:
(20151219) Readwrite stack of objects vs. readonly historical record.
In nonRPN 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 : (20151228)
This design is neither robust nor accurate.
It fails when prettyprinted expression are not properly vetted for the "textbook" dataentry mode.
For example, with the "textbook" dataentry 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 righthandside)
in which case you'll end up with something like:
X
^{2}

Y
^{5}
= 1
5
5
The problem is that the twodimensional 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 muchneeded 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 oneline entry, you get to work with the correct original expression
(the flawed display is ignored) and everything works fine, although it looks bad!
(20151205) Reverse Polish Notation is now just a dataentry 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 4argument summationfunction
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 predeclared
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.)
(20160102) ObjectOriented 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 rightdistributive (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 functioncall will do...
(20151123) Computer Algebra System (CAS)
The Prime's CAS is based on the
Xcas / Giac of Bernard Parisse.
"Derive" and the original TI92. TI89, Voyage and TInSpire CX CAS. ... ...
Casio Class Pad II, FXCP400. ... ...
Integers up to 2589 digits (8599 bits).
The HP Prime's CAS calculator is based on the opensource xCas / Giac
computer algebra system developed by Bernard Parisse
and first released in 2000.
I could live with the lack of RPN dataentry
in CAS mode if HP would only provide a function (usable in expressions)
for deep readonly 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 recursivelydefined
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 12digit 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".
(20151124) 18 Builtin ColorCoded 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 (cutandpaste).
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 builtin 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 easytouse 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 builtin 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 secondorder 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 lowercase 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 realworld 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 softkey). You're then prompted for a new name to give the the copy.
Tap OK and you're done.
(20151127) UserDefined 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 twobox 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 builtin
feature (this would cause a potentially puzzling "Invalid input" error message).
Invalid names include builtin 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" softkey 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 singleletter name.
Reassign a key to make it execute your function.
If you want to stay out of "permanent usermode" 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 (408355 BC)
obtained a nice formula for the sum S of n terms
in a geometric progression of constant ratio x
by remarking that most such terms also appear in an expression
equal to x S :
S
=
a
+
a x
+
a x^{2}
+
a x^{3}
+
...
+
a x^{n1}
x S
=
a x
+
a x^{2}
+
a x^{3}
+
...
+
a x^{n1}
+
a x^{n}
Subtracting the second equation from the first one,
most terms on the righthandside cancel and we obtain:
(1x) S = a ( 1  x^{n })
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 (1x) to obtain
a classic formula giving the sum of the first n terms of a
geometric progression of ratio x starting with 1 :
As we shall soon rediscover, 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 twoargument userdefined 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
predeclared 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 0^{0}
Mathematically, the fact that this 0^{0}
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^n1,(x+1)^n1)  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 given a name to that function if you only
intend to experiment with it a few time.
Note that the above method performs the indicated substitution on the input
expression before they are evaluated.
In some cses, 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 twovariable Laguerre polynonomial (where x and a occur).
Other constructs have mandatory dummy variables builtin.
This includes sums, products and lists obtained with functions
of 4 or 5 arguments:
For example, we may define the userfunction 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(IJ))),N,N)  N=5
BUG : (20151216)
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(IJ),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.
(20151121) 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
Pascallike
language similar to what's used in the successors of the HP38G.
It's unrelated to the stackbased
RPL used in the HP50G.
Programming Environment :
Commands and Statements, Functions and Expressions :
(20151120) 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 builtin "Sequence" app can't properly analyze integer sequences.
For example, try this definition "as is":
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 floatingpoint approximations.
The resulting loss of precision when you subtract nearlyequal 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+9N^{3})^{3} + (9N^{4})^{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 multipurpose functions
AFiles and AFilesB.
Video Tutorial
Part 1 &
Part 2 by rs1n (Sept. 2013).
(20131130) Physical Units.
(Full support of the 20 metric prefixes.)
A rich catalog of 167 named units, from the HP28S legacy.
Unfortunately, some conversions fail at highprecision (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 kilogramforce
but the _kgf is still a valid unit as a standard multiple of
the lesser used gramforce (_gf) which is duly declared
as one of the seven primary units of force.
Metric prefixes are also recognized in combination with nonmetric 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 12digit accuracy,
which is precisely what's needed to quote the exact
legal conversion factors for the poundal, the poundforce, 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 translate 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 10^{16}
should be changed to
3.08567758149 10^{16} .
Apparently, a typo (an extra 0) was
compounded with a twounit 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 9digit 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/s^{2}) (999.972 kg/m^{3}) = 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 HP28S is clearly misguided.
BUG : (20151202)
Something's very wrong with the luminous units.
From the 8 luminous units supported by the HP50G
(_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).
(20151202) 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 highschool 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 floatingpoint number
in the current environment.
They are programming parameters, not constants of nature.
In Home mode, those limits are respectively 10^{500} and 0.1^{500}.
In CAS mode, they are 2.0^{1024} and 0.5^{1024}
(1.8 10^{308}
and 5.6 10^{309 }).
The following table compares the HP Prime's builtin 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/m^{2}/K^{4}
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/m^{2}/K^{4}
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 : (20151203)
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.
(20151216) Lists
A very flexible datatype, 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 blueshifting the "8" key.
Listrelated 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 builtin 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
CASvariable 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 builtin functions except through a wasteful duplication
of the whole structure, through something like:
Arguably, that flaw makes the HP Prime fundamentally incomplete for
listprocessing. 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 n^{2 }).
BUG : (20151216)
The name MAKELIST must be typed, one letter at a time, in UPPERcase.
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 cutandpasted.
The same onthefly 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 builtin 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.
(20151201) 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 highschool 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 usermodifiable 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^61) == [1 0 0 0 0 0 1]
symb2poly(x^61) == [1 0 0 0 0 0 1]
poly2symb([1 0 0 0 0 0 1]) == x^{6}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)*(x1)+1 == x^{2} Lagrange polynomials are dubiously listed among "special" polynomials.
Special Polynomials :
Cyclotomic Polynomials cyclotomic(12) == [1 0 1 0 1]
poly2symb(cyclotomic(12)) == x^{2}*(x^{2}1)+1
== x^{4}x^{2}+1
The cyclotomic polynomial of order n is defined as the unique irreducible
monic polynomial
with integer coefficients which divides x^{k}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").
(20151201) Dates and Builtin Calendrical Functions
A date is an 8digit
decimal number: Year + Month/100 + Day/10000
The yyyy.mmdd date format is inherited from
HewlettPackard'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.
(20151219) Galois Fields
A nearlyundocumented 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 = p^{n} elements.
The integer p must be prime and n must be an integer greater than 1.
This is equivalent to the singleargument 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 4argument 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 = p^{n} is so declared,
each of its elements is simply a polynomial in g of degree n1
or less with coefficients modulo p,
represented by the p integers from (1p)/2 to (p1)/2).
Such polynomials form a vector space
over the field
/p which is turned into a field by the
special way g^{n} is defined as a specific polynomial
of degree n1 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 (4argument)
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 p1).
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 teacherprescribed duration at least.)
BUG : (20151219)
For some values of q = p^{n} 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^2v1,[v k g],undef) or
GF(3,v^2+v1,[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" softkey 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.
(20151127) 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 689page 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 610page document
released in July 2013.
In particular, the only source of information on the calculator's
listprocessing functions
is whatever the calculator itself displays when "Help" is pressed
before calling a function.
There's no easy way to know whether other listprocessing
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.
Touchscreen for softkeys, scrolling, zooming and copying data.
Auto poweroff (5 min.) when running on battery. Data is retained.
Userdefined functions can be "exported" to behave just like builtin.
Redefined keys are active only in an easytoaccess "user mode".
Cutandpaste clipboard retains the last five clips for future use.
Bad color choice for alphabetic key labels (AZ 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 colorblind 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.
Catchall "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 Shift2).
Why disallow a negative starting index in the
"Sequence" app?
Truncation to two decimals under "Finance" hides days from dates.