The HP 49g+ and HP 50g Calculators
descendants of the HP-28 calculators
248 grams, with
four AAA batteries
width : 87.3 mm
length : 184.6 mm
height : 24.0 mm
47 + 4 keys
LCD: 131 x 80 pixels
emulated by a 203 MHz
running at 75 MHz
For some obscure reason, the default factory setting for the HP-49g+ and HP-50g
calculators (which differ in
color and physical design but not electronically)
is to have infix ("algebraic") data entry mode with "soft menus"
However, in their "Quick Start" manual that comes with every new calculator, HP recommends
their historical choice of RPN data entry and soft menus.
Almost all owners of HP's advanced calculators do that by clearing
system flag -95 to allow RPN "operating mode" (by choosing the RPN option in the screen
that comes up when the MODE key is pressed) and also setting system flag -117 to allow
soft menus. Most users do both and never look back.
That's what most discussions assume and that's what we'll assume here.
Unfortunately for first time users, the later modification is slightly less "user-friendly"
than the former but it's still very easy to do.
Do not bother doing anything with your calculator until you've done both modifications.
System Flags and User Flags
A flag is a single bit that rules the machine's future behavior.
Flags are typically global variables whose state can be
read in all of the machine's otherwise secluded software environment
(it's usually not recommended to have several separated program share the
same global variables).
The meaning of each flag must be carefully documented and can be thought as
a different yes/no option in the way the calculator will run.
The hp-48gII / hp-49g+ / hp-50g calculators provide 256 standard flags
each identified by a number between -128 and +127.
The negative-numbered flags are known as "system flags" and each describe
a particular "mode" that changes the way certain built-in functions behave.
User-defined functions and programs may read those flags to adjust their own
behavior accordingly, if needed. However, it's not recommended that
user procedures change system flags (although it's tecnically possible to
For a set of user-procedures to operate in different "modes" that can be
freely modified, the so-called "user-flags", numbered from 0 to 127, can be used.
Traditionally, the low-numbered flags (0 to 9, say)
have no long-term function and can
be used by program segments for their own internal logic needs
(it's assumed that two such program segments never run in parallel on the
same machine and that system procedures that can interrupt the execution of
others never make use of those "temporary" flags).
How my recommendations differ from factory settings
|Number||Description ( & motivations )
| || -3 || Numeric mode off (don't evaluate symbols until so requested)
|Ö|| -27 ||Disallow (x,y) format for complex numbers.
| || -34 ||Print via IR (to use the HP 822840B printer)
|Ö|| -62 ||User keys on (rather than "off")
| || -95 ||RPN mode (rather than "Algebraic mode")
|Ö|| -103 ||Complex on (rather than "Complex off")
| || -105 ||Exact mode on (instead of "Approximative mode on")
|Ö|| -114 ||Display 1+x (lowest degree first)
|Ö|| -117 ||Soft MENU (rather than "CHOOSE boxes")
| || -128 ||Complex variables allowed (sure!)
The minor downside in the last choice is that the real
and imaginary parts of the expression A+i*B
aren't necessarily A and B, respectively.
A small price to pay for the freedom of being able to use Z
as a complex variable...
Among the unfortunate choice of nomenclature in the buit-in software,
is the term "Fraction mark" (flag -51 or "FM" choice in the top MODE meany/)
to designate what ought to be called a "radix mark"
(you have choice between "radix point" and "radix comma").
If the usual decimal system of numeration is used, the radix is ten and what
we're discussing is the (cultural) choice between using either a "decimal point"
or a "decimal comma".
What is RPN?
(Postfix Notation) by Hewlett-Packard
Keyboard, Keys and Modifier Keys
Advanced calculators assign more than one function to most keys.
On the keyboards of basic calculators, every key is assigned one and
only one use, digit entry, binary operation (plus, minus, multiply or divide) or
unary operation (typically, only the square root function is provided on
Scienfific calculators provide so many functions
that several uses must be assigned to a single key.
The additional functionalities are typically accessed by pressing a special
colored key before punching the key (whose extra functionality may be
indicated by a label of the same color either on the key itself or nearby
on the faceplate).
In 1972, the HP-35 started this trend with a key labeled "arc"
which could be pressed before pushing a key assigned to a trigonometric
function to obtain the inverse of that function.
As the features of handheld calculators grew more numerous, the need arose
for several modifier keys similar to that historical key.
The various meanings assigned to the same key are not always strongly related.
The hp-50g has three modifier keys at the bottom-left corner of the keypad:
- A topmost yellow ALPHA key. (It's black on the "blue HP-50g").
- A first SHIFT key (left shift) which is
blue on the HP-49 and white on
the HP-50 (it's light-blue with the blue faceplate).
- A second REDSHIFT key (right-shift)
which is red on both calculators (orange with the blue hp-50g).
As is the case with many other calculators (and some other appliances)
there's a persistent minor flaw in the design of all those keypads:
The mnemonics for the alternate functions of a key are printed
This runs against the otherwise familiar Western tradition of putting
a legend under the object or picture
it documents (the reason for this convention is probably that
this is the only way to inscribe a legend on a pedestal).
To compensate for any possible confusion, the colored shift-keys of
the hp-50g are clearly marked with a large arrow that indicates
where to find the labels on the faceplate, with respect to the modified key.
39 ordinary keys are thus given a total of 117 functions with the presence
of the two "shift" keys.
The yellow ALPHA modifier key only pertains to the 26 keys whose top is
marked with a yellow letter of the alphabet.
The lowercase version of those letter is obtained by pressing the SHIFT
(left-shift) modifier after the ALPHA key.
For 21 of the alphabetic keys, pressing the REDSHIFT
modifier after the ALPHA key yields a special symbol, according to the following:
The 6 keys in the top rows are "soft menu" keys
that behave differently with respect to the shift keys.
A white SHIFT stores the top of the stack into the variable
whose name appears above the key on the screen.
A REDSHIFT puts the stored value of that same variable on top of the stack.
Because of that functionality, the 6 operations printed in white above the
top keys are accessed in a particular way, by holding down the
white SHIFT key while pressing the desired top key.
Encoding of every key of the keypad
The function WAIT is located at PRG+NXT/IN. It takes a single argument (-1 or 0,
depending on whether the display of the current menu is requested or not)
and waits till a key (other than a modifier) is pressed and released.
Among other things, WAIT is a useful function to experiment with just before
you intend to redefine a key for your own specialized usage, since
WAIT will confirm flawlessly the "code" you need to redefine that
particular key for whatever specialized usage you see fit.
WAIT returns the decimal code of the key you press
in the format rc.s where "r" is the row
position on the keypad 1 is the toprow, 10 is the bottom one)
and "c" is the number of the column (1 is the rightmost column)
ranging from 1 to 6 for the top three rows and from 1 to 5 for the lower part
of the keypad. The "up" round key is at position 25 (positions 24 and 26 are
empty and the 3 other round cursor keys are considered part of the third row:
"left" is 34, "bottom" is 35 and "right" is 36.
The decimal part of the keycode indicates its shift state
The 11 possible shift-states (.ss) in a keycode (rc.ss)
| .00 ||Unshifted
| .10 ||.11
| .20 ||Left-shift||.21||Held left-shift
| .30 ||Right-shift||.31||Held right-shift
| .40 ||Alpha||.41||Held Alpha
| .50 ||Alpha + left-shift||.51||Alpha + held left-shift
| .60 ||Alpha + right-shift||.61||Alpha + held right-shift
This leaves so many combinations that some of them are either undefined or undocumented.
Customizing the Keypad
The HP-49g+ / HP-50g calculators allow the user to define or redefine the function of
almost every key (the modifier keys are an exception).
Here are some keypad combinations that have no standard definition (documented or not)
at least in the 2.15 version of the software (2009):
- 25.2 (shifted up-arrow).
- 34.2 (shifted left-arrow).
- 34.3 and (redshifted left-arrow).
(For these round keys, holding a shift key or not does not
make any difference; the codes 25.21, 34.21 and 34.31 are thus not available.)
You may want to try this feature first by assigning functions to
combinations that do not have a standard definition.
If you mess things up, you may always cancel "user mode" by doing a "warm start"
to disable (temporarily) all the customized key definition
and regain the built-in functionality of your calculator to clean up the
damage before entering "user mode" again.
To do a "warm start":
- Press the ON/CANCEL key (at the lower left of the keypad).
Don't release it yet!
- Press and release the F3 key (third from the left in the top row).
- Release the ON/CANCEL key.
The functionality of every user-defined
key is suspended every time you perform such a
warm-start, until you reset
the system flag -62.
Knowing how to recover from catastrophic mistakes,
we may now redefine a few keys with some peace of mind...
(There are also commands intended for people who want to redefine
the entire leypad. I won't discuss those.)
For example, to let the shifted up-arrow give the number of the
current menu, do:
« RCLMENU » 25.2 ASN
the left arrow call a menu by number when left-shifted, do:
« MENU » 34.2 ASN
To also make that same key conjure up the PRINT menu
when redshifted, do the following:
« 107 MENU » 34.3 ASN
To view those three key definitions (and other active ones, if any) do:
To cancel the first definition, say, you may execute:
To cancel all key definitions, do:
If you experiment
a lot with this feature, be aware that
defining a key and cancelling its definition individually
will waste a few bytes of memory
that are not reclaimed until the whole thing is cleaned up
(by executing 0 DELKEYS).
To clean-up while preserving all your definitions, do:
RCLKEYS 0 DELKEYS STOKEYS
The number of the menu related to keypad manipulations
is 67. If you've defined the keys as above,
you may navigate to it in 3½ keystrokes!
HP 82240B thermal printer with infrared (IR) link.
The standard printer for recent HP calculators was introduced in 1989.
The original HP-49g (1999)
was powered by the same 3.68 MHz Yorke chip
(native Saturn architecture)
as the earlier HP-48gx, HP-48g, HP-38g and HP-39g.
The single high-power pin of that chip
(used for IR transmission by those other calculators) was needed for
the write mode of the flash memory which the HP-49g was the first to offer.
Therefore, the HP-49g had no IR capability at all.
The HP-49g+ (2003) and HP-50g (2006) are based on completely different hardware
(whereby the Saturn CPU is emulated by a RISC processor) and they do offer IR
communications at low power (limited range).
The outgoing IR beam is in the middle of the forward panel,
at the location indicated by the small forward-pointing triangle printed on the faceplate.
This arrow should be aligned with the IR input port of the HP 82240B printer (to the left of
the red power indicator).
For reliable transmission on battery power, it's best not to exceed
a separation of one inch between the two!
When the calculator is powered by a USB cable, the distance can be up to six inches or so
(a good thing, since two inches of forward clearance are needed to
plug in the straight USB cable which comes with the HP-50g).
Printing outdoors, or in bright light, can be a problem
(if so, shade the space between the printer and the calculator with a piece of cardboard).
The calculator's flag -34 must be cleared (unchecked) to read "Print via IR" instead of
"Print via wire" which is the default factory setting.
For test purposes, use either PR1 or PRST with a single number on the stack.
HP-49g+ / HP-50g System Flags Related to IR Printing
|Number||Description ( & recommended setting )
| || -33 ||Transfer via wire (irrelevant to IR printing)
| || -34 ||Print via IR (MUST be clear/unchecked)
| || -35 ||ASCII transfer (default setting = clear/unchecked)
| || -37 || Single-space print
(check if double-spacing is desired)
| || -38 ||Add linefeeds (default setting = clear/unchecked)
All the print-related functions are described below.
In particular, the following sequence of commands displays a plot of the current equation (if there is one)
and sends it to the printer:
« ERASE DRAW PRLCD »
HP-49g+ / HP-50g Commands Related to Printing « 107 MENU »
|PRVAR||Print the name and content of the specified [list of] variable[s].
|PRST||Print all objects on the stack (highest level first).
|PRSTC||Print the stack compactly (truncated to one line per object).
|PRLCD||Print the LCD screen, dot by dot (annunciators excluded).
|CR||Carriage-Return: Send print buffer with line terminator.
|PR1||[push NXT to access] Print one object (in multline format if needed).
|PRTPAR||Display PRTPAR (see below) and do
« 108 MENU » to modify it.
|DELAY||[on PRTPAR menu 108] Change the print delay in PRTPAR.
|OLDPRT||[on PRTPAR menu 108] Change the remapping string
to make the best use of an old HP 82240A
(second item in PRTPAR, see below).
|PRTPAR||[on PRTPAR menu 108] Show updated contents of PRTPAR.
|RESET||[on PRTPAR menu 108] Reset PRTPAR to its default setting.
|INFO||[on PRTPAR menu 108] Same thing as above PRTPAR soft key.
|PRINT||[on PRTPAR menu 108] Goes back to the main "print" menu (#107).
The value of the reserved variable PRTPAR is a list four parameters that can be reset
to the following default settings by purging it:
- Print delay. Normally set to 0. Modified by the function DELAY.
- Character remapping string, set by default to the empty string.
The empty string (no remapping) is appropriate for the newer (1989)
HP 82240B printer.
To use the previous (1986)
HP 82240A, the remapping string should be set to the proper
(complicated) value by executing the
OLDPRT command (whose effect can be undone
by purging the entire PRTPAR variable).
Even so, there are 24 special characters that the old HP 82240A can't handle
properly (they will be printed as checkered rectangles).
- Line length. Normally set to 80.
- line terminator string. Normally, a two-character string (LF & CR).
The two special characters known as
line feed (LF, ASCII code 10) and carriage return
or carriage right
(CR, ASCII code 13) were originally meant to encode two
distinct mechanical operations.
On old typewriters, the bulky printing mechanism was stationary and the paper
was held on the roller of a moving "carriage" that had to move to its rightmost
position for the next character to be typed on the leftmost position on the page
(a "carriage return" was thus, indeed a "carriage right" operation).
The other operation (LF) was to make the roller move the paper up by a
height corresponding to one line of text.
Although those two operations are mechanically distinct, typewriters and printers
were often built to handle them together.
Some printers will thus execute both upon receiving just one of the two codes or
either of them!
Possibly (although I don't recall a single example of this)
they could even expect to receive both codes specifically in reverse order (CR then LF).
Modifying the standard line termination "string" can deal with all such possibilities as needed.
Stored ASCII text files typically separate lines with CR codes only, but other possibilities survive.
The raw content of a text file is rarely, if ever, sent to a printer "as is".
Calculator source ($149.95)
Eric Rechlin ($155)
E-Bay (I got a used one for $65)
"Redeye" (82240A) & "Visine" (82240B)
Technical Interfacing Guide (pdf)
HP Forum Archive :
(AC Adapter & Printing from HP-49g+ / HP-50g)
March 2009 (HP-50g)
The three pseudo-numerical infinities.
Do not confuse positive infinity (+¥, "Shift-0", real)
with the unrelated unsigned infinity (¥, 1/0, complex)!
The only algebraically-defined infinity (i.e., 1/0)
is the unsigned infinity
¥ , at the
"horizon" of the plane
of complex numbers.
It verifies the following relations, for any finite nonzero complex number z :
z . ¥ = ¥
¥ . ¥ = ¥
z / ¥ = 0
z / 0 = ¥
The following expressions are explicitely undefined :
0 / 0
0 . ¥
¥ + ¥
Adding two signed infinities
-¥ and +¥
on either side of the (open) real line form what's called the
closed real line.
Those two are not defined algebraically but as the conventional results of some
In particular, +¥ isn't equal to
the aforementioned unsigned infinity ¥
(the "plus sign" is not optional). We have
-¥ = (-1) (+¥)
(+¥) = +¥
-¥ + (-¥) = -¥
+¥ + (+¥) = +¥
The following relations hold for any nonzero real x and any positive y:
-¥ + x = -¥
-¥ . y = -¥
x / (-¥) = 0
+¥ + x = +¥
+¥ . y = +¥
x / (+¥) = 0
The following expressions are undefined
within the closed real line :
-¥ + (+¥)
-¥ . 0
+¥ . 0
x / 0 (for x finite or infinite)
With one caveat which shall be discussed shortly,
the three types of pseudo-numerical infinities are perfectly implemented on the HP-49 series,
in accordance with the above rules.
(Not so with the TI calculators reviewed elsewhere
on this site, which merge positive infinity and unsigned infinity into one single
ill-defined entity, with unacceptable results.)
The keyboard (SHIFT 0) gives positive infinity
(+¥) and it can be changed to
negative infinity (-¥)
with the (+/-) key (located above the "7" key).
The unsigned infinity (¥)
is best obtained as the result of 1/0. Note that:
ATAN(+¥) = p/2
ATAN(-¥) = -p/2
ATAN(¥) = ?
Regrettably, HP has accomodated the dubious expectations of some
users by letting the comparison operator ==
(but, mercifully not the operator SAME) evaluate to 'true' when comparing
a positive infinity and an unsigned infinity...
This introduces an unfortunate exception to the fundamental rule that functions of
equal arguments (in the case both are known exactly)
must have equal values, or be both undefined.
The calculator uses the symbol "?" to indicate explicitely an undefined result.
Problems with Zero - Numberphile
Dubious interviews of Matt Parker and
This video shows two seasoned mathematicians present trivial
issues that they never really bothered to ponder.
They're just rehashing the prejudices they were submitted to as children.
Surely, the 3 types of pseudo-numerical infinities discussed above
(and not at all identified in the video) are not ordinary
numbers and you are only allowed a limited number of
algebraic manipulations with them.
(Yes, 1/0 and 2/0 are equal, but this doesn't prove that 1 and 2 are.)
Instead of ignoring those things with a smile, educators should show how
helpful it is to build such unforgiving algebraic rules into a modern calculator.
Shouting "undefined" should only be done as a last resort.
Even more irritating (to someone who's trying to educate both the
general public and software engineers)
is the mindless bit about 00.
To summarize what I've already said elsewhere:
Yes, the function xy has an essential discontinuity at (0,0)
but it is well defined (equal to 1) at that very point.
Nothing prevents discontinuous
functions from being defined at a point of discontinuity.
For an electronic calculator that features an "exact" mode,
an exponent can be known to be the integer 0
(and not a dubious approximation thereof).
In that case, the expression x0 is a product of no factors
and must be equated to the
neutral element for multiplication, regardless of
the value (x) that would be assigned to a factor if we had to consider one.
This convention, if you must call it that, is fortunate
too... Otherwise, a large part of the mathematical literature would
have to be rewritten to avoid polynomial functions to be mistaken for
discontinuous functions whenever they're written in the usual generic way:
P(x) = Sn
Predefined Physical Units.
It's not possible to define other ones.
The first thing is to observe the location of the underscore character on the
keypad. Its code is 75.3. That means it's located on the seventh
row (from the top) and the fifth column (from the
left) with a right-shift (that's what ".3" means).
Numbers with physical simensions are ordinary real numbers
followed by a suffix consisting of an underscore character followed by
the name of a physical unit which can be either its predefined
abbreviation with or without an exponent (the "^" character
is obtained by pressing the first key of the fith row) or
any multiplicative expression of such (using parentheses
and the operators "^", "*" and "/").
The following units are avalaible in the various submenus of the
Length: _m _cm _mm _yd _ft _in _Mpc _pc _lyr
_au _km _mi _nmi _miUS _chain _rd _fath
_ftUS _mil _m _Å _fermi
Area: _m^2 _cm^2 _b _yd^2 _ft^2 _in^2 _km^2
_ha _a _mi^2 _miUS^2 _acre
Volume: _m^3 _st _cm^3 _yd^3 _ft^3 _in^3 _l
_galUK _galC _gal _qt _pt _ml _cu _ozfl
_ozUK _tbsp _tsp _bbl _bu _pk _fbm
Time: _yr _d _h _min _s
Frequency: _Hz (at the end of the "Time" menu)
Speed: _m/s _cm/s _ft/s _kph _knot
Acceleration: _ga (at the end of the "Speed" menu)
Mass: _kg _g _lb _oz _slug _lbt _ton _tonUK
_t _ozt _ct _grain _u
Bulk: _mol (at the end of the "Mass" menu)
Force: _N _dyn _gf _kip _lbf _pdl
Energy: _J _erg _kcal _cal _Btu _(ft*lbf)
_therm _Mev _ev
Power: _W _hp
Pressure: _Pa _atm _bar _psi _torr _mmHg
Temperature: _°C _°F _K _°R
Electrical: _V _A _C _W _F _W
_Fdy _H _mho _S _T _Wb
Angle: _° _r _grad _arcmin _arcs
Solid angle: _sr (at the end of the "Angle" menu)
Light: _fc _flam _lx _ph _sb _lm
Radiation: _Gy _rad _rem _Sv _Bq _Ci _R
Viscosity: _P _St
Except for four headings ("Electrical", "Light", "Radiation" and
"Viscosity") the above list regroups under the same heading
units of the same physical dimension.
(The list has the same structure as the UNITS submenus on the calculator, except as noted.)
To express a dimensioned quantity in compatible units, one feeds it as
the first argument of the CONVERT function which receives as
second argument any quantity (whose magnitude is ignored)
expressed in terms of the desired target unit.
To have the result expressed in compatible standard SI units,
one uses the function UBASE (which takes a single argument).
Unfortunately, this breaks SI units down to their MKSA components
and yields unit combinations that may not be easily recognizable,
especially in the case of electromagnetic units...
The function UFACT can be used to collapse "manually"
the units of one quantity in terms of a multiple of the other, but
that's a lot of trouble just to visually inspect the dimension of a result...
By contrast, the descendants of the
TI 92 plus calculator
automatically give you one of the simplest possible expressions of each unit.
They may give you electric fields in N/C instead of
V/m but that's still easy to get used to and
much better than the cryptic SI
equivalent of kg.m/A.s3.
Physical units were first introduced by HP with the HP-28 handheld calculators
back in 1986 (along with the first public version of their RPL language).
Surprisingly enough, their "precise" definition of the year as a unit of
time was erroneous then and it remains erroneous now, nearly 30 years later.
Not only is it wrong in HP calculators but it's also wrong in handheld calculators
by other manufacturers, who have mindlessly
copied HP's mistake. For the record:
The only scientific definition of the
year as a proper unit
of time is 31557600 seconds
(that's 8766 hours of exactly 86400 atomic seconds). 100 of those
years make, by definition, one Julian century,
the unit of time commonly used by astronomers to describe
the so-called secular variations
in decaying periods within the solar system
(including the mean solar day or the tropical year).
Also, one light-year is defined as the distance obtained by multiplying
the speed of light
(Einstein's constant, c) into this precise duration (and no other).
Instead, HP has wrongly been using the nominal duration
(31556925.9747 s) of the tropical year at epoch 1900
(i.e., 31 December 1899
at noon GMT) which served in the astronomical definition
of the former "ephemeris second".
That duration was also used to calibrate astronomically
the newer atomic definition of the SI second but it was certainly
never meant to be a proper unit of time itself (at best, it's only
a slightly obsolete approximation to the actual tropical year,
whose precise value decays as time goes on).
No User-Defined Units :
The HP firmware doesn't provide any way to define specialized
units other than the predefined ones.
If you owned a calculator descended from the
TI 92 Plus (the original TI-92 didn't support units at all)
and were in love with the typographical point
(and/or the Didot point a submultiple of the ancient
pied de roi )
you could simply tell your calculator about it,
once and for all in the following way:
0.013837 _in ® _point
There's no way to do anything similar with an HP-50g.
Severe problems and minor ones.
Unfortunately, like many other calculators,
the HP-50g suffers from the annoying widespread prejudice against raising
zero to the power of zero
(which is actually a perfectly well-defined operation whose result is 1).
With all revisions of the HP-50g firmware (at this writing)
raising zero to the power of zero
wrongly gives an undefined result (symbol "?").
Needless restrictions :
A number of functions which are either nonsensical or notoriously
unpredictable in approximative calculations are only available in
"exact mode". For each of those, the reference manual warns us that:
Exact mode must be set (flag –105 clear).
Numeric mode must not be set (flag –3 clear).
So far so god, but we are also needless told that
"radians mode must be set (flag –17 set)". even in those
cases where angle measurements are irrelevant... Indeed, the calculator will
ask you to leave the realm of angular degrees befor it allows you to perform
modular arithmetic and the like...
This applies to the following functions, in particular:
DIV2, DIV2MOD, DIVPC,
IABCUV, ICHINREM, CHINREM, IEGCD, IQUOT, IREMAINDER,
SUBST, SUBTMOD, TRUNC.
For matrix and/or
computations that are also irrelevant to angle measurements,
exact mode is, arguably, a needless luxury as well (although correct approximative
computations are admittedly a major source od headache for system programmers).
The above bug is thus combined by this wishful remark for:
AXQ, GAUSS, GBASIS,
JORDAN, LAGRANGE, MKISOM,
QXA, REORDER, SYLVESTER.
"Not only the trigonometry rewriting operations, but some other CAS operations require the angle mode to
be set to radians (flag –17 clear), even if it is not immediately obvious that this is so. For this reason, the
Flags section of many operation descriptions says that radians mode should be set"
Complex Functions of Complex Variables
Discontinuity cliffs appear in the complex extensions of some
By default, electronic calculators
don't extend the domain or the range of real analytical functions
to the complex realm.
With the HP-49/HP-50 calculators, complex calculations must
be explicitely authorized by changing the factory setting
of flag -103 (either directly
or via the CAS submenu from the MODE screen).
It's also recommended to clear manually the last system
flags (-128) to also allows variables to represent complex numbers.
Beyond introductory or specialized calculations, there are indeed few advantages
in assuming that all variables are real
(to state, for example, that the real part of the quantity
a+ib is always a ).
For consistency, I recommend to set flag -27 as well
(otherwise, some misleading output like (a,b)
no continuous way
to extend to the complex realm some quantities defined
for positive real numbers, including square-roots and logarithms.
Be that as it may, is not handling this particular
mathematical situation nearly
as well as their historical competitor (whose
consistent approach is reviewed
elsewhere on this site with a discussion of the relevant
Although HP probably didn't design this strange behavior
intentionally, the way they implemented the square-root function
makes it unusable whenever there is any chance that
the argument will be a negative real number
(complex numbers with a nonzero imaginary part seem to be
RPL programming ( Reverse Polish LISP )
RPL officially meant ROM-based procedural language (HP, 1986).
is a stacked-based programming language similar to
It originated in 1984 at HP's development facility of Corvallis (Oregon)
and has been supported by all main HP programmable calculator series since then:
HP-48 (1990-2003) and
HP-49 series (1999)
which includes the current HP-49g+ (2003) and HP-50g (2006).
RPL is also supported by the rare HP calculators
which provide only traditional infix notation for data entry, including
the HP-38 (1995) and
HP-39 series (2000-2006).
In the parlance of HP and other calculator makers who target the high-school crowds,
infix data entry is dubbed "algebraic".
It's opposed to the more efficient postfix data entry championned by HP under
the name of RPN or Reverse Polish Notation,
starting in 1968 with the
programmable desktop calculator and, in 1972, with the ground-breaking
the first handheld scientific calculator.
Nevertheless, the data entry method is merely a "user interface" choice which need not be related to
the stack-based structure of RPL itself.
"Algebraic" data entry is offered as an option on the latest HP-49/HP-50 series.
Presumably for commercial reasons, it's even the default factory setting on those calculators
(although almost all owners do change
the setting to RPN data entry, as recommended by HP in their Quick Start manual,
and never look back).
The newest HP calculators are also programmable in the assembly language of the
(introduced in 1984 for the
HP-71B, a BASIC-programmable
upgrade to the legendary
The HP-41C itself was made from 1979 to 1990 but it was brought back as a "limited edition" in 2011,
with an internal engineering design close to that of the best-selling
HP-12C financial calculator, the only
other vintage-class HP calculator still in production.
The HP-12C was first introduced back in 1981 and its mode of operation set
a standard among financial consultants which endures to this day.
Finally, the HP-49 and HP-50
are based on a RISC processor which emulates the Saturn processor.
They come with the "MDG Meta Kernel",
a full programming environment which was once a costly
third party add-on, as advertised on the screenful at right
(very briefly flashed every time a
warm-start is performed).
Easter Eaggs : Just for fun.
Documenting undocumented features.
It's a modern tradition by programmers of complex system
to add unofficial features whose convoluted mode of access
is spread by word of mouth among the community of users.
Those are known as Easter eggs.
Here are some
of the better known Easter eggs for the HP-50g:
Collective signature of the development team:
Type in the word RULES on an HP-50g
and you'll see a crossword display of 26 words.
This includes the acronym ACO which stands for
Australian Calculator Operation
the great HP design team that was formed in November 1997 and
disbanded in November 2001.
Their greatest endeavor was the HP-49 (of which the
HP-50g is a late incarnation). That project's code name
(VGER or V'Ger) is found just below ACO.
In the first
Trek movie (released in 1979) V'Ger is the name of
a huge computing entity which approaches Earth in 2271.
As the story develops, it is revealed that V'Ger was built by unknown aliens
who had retrieved the old Voyager 6 spaceprobe
from Earth and sent V'Ger (a quick way to pronounce "Voyager")
to seek the origin of the message carried
but the probe (which they encase in the core of V'Ger).
In the course of things, V'Ger becomes sentient and interprets
its mission as a quest for the "creator" of its own soul.
Unfortunately, it ends up mistaking humans for lifeforms "infesting" starships...
The other words (including "G.T.")
are the first names or nicknames of the following 24 people,
who were part of the adventure:
- Bernard Parisse.
HP-49 Computer Algebra System (CAS).
- Chris Leitao
- Christian Bourgeois
de Brebisson, R&D engineer.
- Dan Smith
- David Chibo
- Gabriel Lagos
- Garry Heinze, HP Australia (1997).
- Geoffrey Marnell
- Gerald Squelart,
- G.T. Springer,
"Education Solution Architect".
- Jean-Yves Avenard. HP48 Meta-Kernel (MK).
- Jeff Harcourt
- Jian He
- Keiran O'Neill,
hardware engineering consultant.
- Mark Carter
- Mika Heiskanen.
HP-49 Computer Algebra System (CAS).
- Mitch Davis. Manufacturing.
- Nigel Hooke,
Australian software designer.
- Peter Lanius, Ph.D. (particle physics).
- Ray Suryn, software engineer.
- Rodolfo Sandonato,
- Tanya Brooks.
Product manager (sales/marketing).
- Tehn Yit Chin.
Press the ON key to go back to normal operations.
Possibly because his first name was too long,
Claude-Nicolas Fietcher isn't included in the above but
he is prominently credited in the following way:
Typing the word VER yields (with the latest HP-50g firmware
at this writting) a value of 4.20060919
and a two-line display at the top of the normal screen which says:
HP49 CAS by Parisse,
Heiskanen & Fietcher
The official VERSION command puts two strings on the stack.
One identifies the firmware version, the other is a copyright notice.
2: "Version HP50-C
1: "Copyright HP 2009"
To bring up the game, with firmware above 1.18, do the following:
- Enter the equation writer EQW
(3rd key of 4th row, redshifted).
- Lock alphabetic entry mode (press ALPHA twice).
- Type the word MINEISBETTER.
- Exit alphabetic entry mode (press ALPHA once).
- Push the (round) up-arrow key to highlight the whole word.
- Choose SIMP on the soft menu (press last key of the top row).
The game is played by pushing 5 to rotate the current falling piece
(push and relaease the "2" key to force it to fall one step down
or hold 2 to make it fall very fast).
Keys 4 and 6 move the piece left and right, respectively.
The object of the game is to form as many complete horizontal lines of squares
(it need not be at the very bottom of the playing field,
although it often is in normal play).
Once a line is formed, it is deleted and and leaves more breathing room to play the rest
of the game.
The shape of the next piece is previewed on the top right to
help the player choose best tactics to position the current piece.
The game ends when the playing field is so cluttered that new pieces can't even fall
down a single step.
The game accelerates once 30 lines have been scored,
which makes it much more difficult to play beyond that point.
There does not seem to be any way to exit a game except by playing it out
(if need be, you can do that quickly by pushing and holding the "2" key
as pieces keep appearing).
At that point, the score obtained (number of horizontal lines completed)
is shown as the "result" of what's formally the "simplification" of
MINEISBETTER. You can push that result to the stack by pressing
the ENTER key to return to normal operations.
If a key is depressed just after the game ends, it overwrites
the score which normally appears in EQW mode.
If that happens, you may retrieve the score by pushing UNDO
(the HIST key redshifted).
If that doesn't happen,
you may still want to push UNDO to cancel the result
of the last action (namely, playing Tetris) and just
retrieve the name MINEISBETTER itself.
If you do that,
you just need to push SIMP again
(soft label of the top-right key marked F6)
to start a new game of Tetris, without any typing.
Play MineHunter :
This game was bundled with HP-48 calculators but not with
the early HP-49 calculators.
Technically, it isn't an Easter egg but a regular command,
documented in the HP-50g reference manual (Advanced User's Guide):
MINEHUNT (abbreviated MINEH) is the first item in menu 117.
- Push the APPS key.
- Select the 12th choice (Equation Library).
- Select the UTILS submenu.
- Select the first item in that menu.
Alternatively, type MINEHUNT or retrieve that from the CATalog.
The game is played on a grid of 128 squares (16 by 8).
Starting at the top left corner, the object of the game is to reach the bottom right
corner without hitting any of the hidden mines.
The more squares you visit before
reaching the goal, the higher your score
(the maximum score is normally 108, if you set to n the
number of mines, it becomes 128-n).
The game isn't timed.
You move using either the four arrow keys
or the numerical keys surrounding the "5" key
(the latter method is reguired to move diagonally).
There are normally 20 hidden mines, but this number can be changed by storing any
integer from 1 to 64 into a variable called
Nmines in the current directory.
If a negative number is used, the mines will be visible!
As you move about, you're told how many mines are "near" your current position
(i.e., on one of the 8 adjacent squares).
Collecting this information mentally is often
(but not always) sufficient to solve the entire game by pure logic,
without taking any risky guesses.
When you've completed a game
(successfully or not) you may start a new one immediately by pressing F1
Press ON (bottom-left corner)
at any time to quit playing without saving the current game.
You may also exit by pressing STO to save the current game
into a variable called
MHpar in the current directory
(next time MINEHUNT is executed,
the game so saved will be loaded automatically from whatever directory is then current
and the corresponding MHpar will be PURGEd).