To view this online help from the Simulator press F1.
By default, the Simulator uses the Mozilla Web Browser to display the on-line help. If you have not installed it on your system, the Simulator will automatically choose another browser. You can also specify your preferred browser in the Preferences dialogue box.
Using the Mouse
Each key on the real HP-15C has three functions, a primary function in white, and two secondary functions in gold and blue. Pressing the key itself calls the primary function. To call a secondary function you press one of the two shift keys f or g, followed by the key with the secondary function. The Simulator behaves in exactly the same way if you click the buttons with the mouse.
On the Simulator, you can access the secondary functions also directly by clicking on the gold and blue labels. You do not need to click the f or g button before. This behaviour can be switched off in the Preferences dialogue.
When you move the mouse over a gold or blue label, the label becomes highlighted, i.e. the foreground and the background colour are exchanged. If a shift key is active, an "f" or a "g" is shown in the status line of the display, and the highlighting is active only for corresponding functions. The highlighting can be switched off in the Preferences dialogue. Highlighting is always off if the direct access to the secondary functions is switched off.
If you click on a gold label while the blue functions are active, indicated by the letter "g" in
the display, the blue function is called and not the gold one you clicked. The sequence
g →H.MS will therefore not call the
function →H.MS but →H. The behaviour
is the same if the gold functions are active and you click on a blue label.
In general, clicking on any of the three parts of a Simulator button while a secondary function indicator is shown in the display will call the corresponding secondary function of that button.
Using the Keyboard
Each Simulator button is mapped to a single keyboard key (see section Keyboard). Pressing the keyboard key has the same effect as clicking the button with the mouse. This allows it to use the Simulator in almost the same way as the real HP-15C. For example, the SIN button is mapped to key S; thus, pressing S will compute the sine of the value in the display. To compute the inverse sine you can either click SIN-1 or key in the sequence G S on the PC keyboard.
On the real HP-15C only two keys, SST and BST in PRGM mode, have auto-repeat functionality. On the Simulator the auto-repeat functionality depends on the operating system.
- Windows: No auto-repeat for any key.
- Linux: If auto-repeat is enabled in the system settings, all keys have auto-repeat functionality.
Exceptions from this rule are:
- → or SST (in Run mode)
- I or i
- space or PREFIX
These keys behave differently for the <KeyPress> (<ButtonPress>) and the <KeyRelease> (<ButtonRelease>) events, and therefore have no auto-repeat functionality. See the keyboard page for a detailed description.
Combining Mouse and Keyboard
Mouse and keyboard operations can be mixed without any limitation. Let us assume you typed in a time value as a decimal number. To convert this value into hours, minutes, and seconds, the HP-15C provides the function →H.MS. Each of the following mouse/keyboard sequences will call this function:
|F 2||f 2
|F 2||f 2||→H.MS (click on the gold label, when direct access is turned on)|
Like the real HP-15C, the Simulator allows abbreviated key sequences for some of the gold secondary functions. In general, the f key is obsolete when it follows another prefix key in a key sequence. For example, the sequence f LBL f A can be keyed in as f LBL A and the sequence STO f RAN # can be abbreviated to STO RAN #.
The contents of the X register can be copied to, and set from, the clipboard with the standard keyboard shortcuts Ctrl–C and Ctrl–V.
When you copy a number to the clipboard, its internal representation is used, not the one shown on the display.
Assume you set the display format to fixed format with two decimal places
(f FIX 2).
If you key in the number
4567,105 and press ENTER, it is being displayed as
4.567,11. The number becomes rounded to two decimal places and a digit separator is added. Internally
the number is stored in the form 4567.105, without digit separators, and with a period for the decimal point and all
By default, the Simulator uses the same character, period or comma, as decimal point as in the display.
To allow different settings for the clipboard and the display, you can force the usage of "C locale" for the clipboard
(see Preferences). In the above example the number will either be copied as
4567,105 (period is a comma) or as
4567.105 (period is a point), depending on the current settings.
When a number is pasted from the clipboard, the format is detected by the following actions:
At first, any character at the beginning and the end of the clipboard data that can not be part of a number, is removed:
123.456.789,00: most countries in Europe
123 456 789,00: France, Latvia and others
123 456 789.00and
When the real HP-15C is turned off, the memory content is preserved in its Continuous Memory. The Simulator mimics this behaviour by writing the memory to a file when it is `turned off´.
The name and directory of the memory file depend on the operating system. While the name is fixed, the directory is derived from environment variables:
|UNIX/Linux/Mac OS X||$HOME||.hp-15c.mem|
At start-up the Simulator checks for a memory file and tries to load it. If no file is found, all registers are set to zero and all status settings are set to their default value. If an existing file can not be read in, an error is reported and the default settings are used.
To save the memory manually, press Ctrl–M. To reload the previously saved memory, press Ctrl–L.
The following items are saved in the memory file:
- Stack and LSTx register
- Program registers
- Program documentation
- Status information:
- Settings for digit separator and decimal point
- Display mode and precision
- Trigonometric mode
- Initial value for random number
- User mode status
Some statuses are not saved, and are reset to their default value every time the Simulator is started:
- f and g are reset
- A running program is stopped
- Input is terminated
- Run mode is activated
- Blinking (Flag 9) is switched off
- Error status is reset
The HP-15C has two main modes: Run mode and PRGM mode. Run mode is the normal operation mode where you can do all your calculations. PRGM mode is used to enter programs, which can then be executed in Run mode. After the HP-15C is turned on, it is in Run mode.
You can also choose between the Real mode and the Complex mode. By default, the HP-15C is in the Real mode.
Run/PRGM mode and REAL/Complex mode are independent from each other. For example, you can enter a program in the Real mode and then execute it in Complex mode and vice versa.
The Run mode is described below; the PRGM mode is described in the Programs section.
Reverse Polish Notation
Like all HP calculators of its time, the HP-15C uses Reverse Polish Notation (RPN).
In the widely used Infix Notation, terms are written in the form "
13 + 29",
whereas in RPN this term reads "
13 29 +". RPN is a so-called postfix notation: Operators,
+", do not stand not between the operands, but after them.
For the HP-15C, this means that you enter the digits of the first operand and hit the
ENTER key, which pushes the input to Y-register (see below), then enter the
digits of the second operand and select the operation. The operation will act on the numbers in the
X and the Y register.
The stack of the HP-15C consists of four registers, named X, Y, Z and T. The display always shows the contents of the X register. A fifth register LSTx (last X) stores the last operand used in an operation. This can be useful if you want to do consecutive operations with the same parameter.
When you key in a number, it is stored in the X register. Functions that require only one parameter, like square root or the exponential function, take the value in the X register, compute the result and write it to the X register. When you press ENTER, the stack content is pushed up, that is, the number in register X is copied to Y, that in Y is moved to Z, and that in Z is moved to T. The number previously stored in T is discarded.
Operations that require two operands take the values in the Y and X registers, remove them from the stack and write the computed result to the X register. The other registers are `popped´; that is, their contents are moved down one register. The value formerly in Z is moved to Y, and the value in T is copied to Z (thus leaving the same value in both Z and T).
Let us, for example, take the operation "
6 × 7", which is keyed in as 6
The following figure shows the effect on the stack as the keys are pressed (Register Z
is already loaded with a value from a previous operation):
Please see the HP-15C Owner's Handbook for a complete description of data entry and the stack.
The Imaginary Stack
Operations with complex numbers use a second stack, the so-called imaginary stack. This stack holds the imaginary part of complex numbers, while the real parts are stored in the normal real stack. Like the real stack, the imaginary stack has the four registers X, Y, Z and T, plus the LSTx register. The imaginary stack is created automatically when you enter Complex mode and it is destroyed when you leave it.
Complex mode is switched on by one of the following functions:
|f I||Creates a complex number from the values in the X and Y register of the real stack.|
|f Re↔Im||Exchanges the real and the imaginary part of a complex number.|
|g SF 8||Sets flag 8, the COMPLEX flag.|
Flag 8 indicates whether Complex mode is on. The only way to switched off Complex mode is to clear flag 8 (g CF 8). The letter "C" in the display status line indicates that the HP-15C is in Complex mode:
Entering Complex Numbers
To enter a complex number, enter the real part of the number in the Y register and the imaginary part in the X register. To create the complex number click f I to create the imaginary stack. The number in the real X register is then moved to the imaginary X register and the real stack is popped. The number previously in the real Y register now is in the real X register. Thus, the complex number is stored in the two X registers, the real and the imaginary one.
The following example shows how to enter the complex number
6+7i and the effect on the real
and imaginary stack. The real stack already contains results from previous calculations:
As you can see from this example, the imaginary stack does not exist until you press f I.
Registers in the imaginary stack not yet used are initialised with
We will now add the complex number
2+3i to that in the X register.
The second number is keyed-in in exactly the same way as the first one:
Please note that when you press ENTER both stacks are pushed up.
The following functions make use of the imaginary stack:
- Functions with one parameter:
√x̅ x2 LN LOG ⅟x 10x ex ABS →R →P
SIN COS TAN SIN-1 COS-1 TAN-1 HYP HYP-1
- Functions with two parameters:
+ − × ÷ yx
- Compare functions:
x=0 TEST 0 (
x ≠ 0) TEST 5 (
x = y) TEST 6 (
x ≠ y)
- Stack operations:
x↔y R↓ R↑ ENTER LSTx
All other functions ignore the imaginary stack.
The Preferences dialogue box allows you to change the simulator parameters. It can be found in the ON pop-up menu: Alt–O Preferences…
Pressing OK or Apply will activate the new settings for the current session. The settings are not saved to disk, and therefore not made persistent, until you save the current session. If you have unchecked Save on exit (see below) you must save the current session manually by pressing Ctrl–M.
The following items can be set in the dialogue box. Default values are used if no memory file is found at start-up.
- Access 'f' and 'g' functions directly
If this option is checked you can directly click the gold and blue secondary functions. You do not need to press or click f or g before. If unchecked, the gold functions can not be clicked and clicking a blue function is the same as clicking the main key function.
- Highlight functions
This option enables mouse-over effects for the blue and gold labels, if direct access to the f and g functions is enabled.
- Strict HP-15C behaviour
The real HP-15C stores numbers internally with 10 digits, and rounds every result to the 10th digit. The Tcl/Tk interpreter stores numbers in the IEEE-754 format with 17 digits and a different rounding mechanism. When checked, this option sets the number of relevant digits to 10 and rounding to that digit.
The following calculation shows the effect of the two settings:
f FIX 9
2 ENTER 3 ÷
0 . 6 6 −
1 0 0 0 ×
Result with strict HP-15C behaviour checked (10 digit precision):
Result with strict HP-15C behaviour not checked (17 digit precision):
Rounding to the last digit in the second case happens only in the display. Internally the number is stored as
6.666666666666599, providing the full precision.
Further information can be found in the part about number encoding in the Differences section.
Default: not checked
- Save memory on exit
If checked, continuous memory is enabled. When you exit the Simulator, the status is saved to disk.
If you uncheck this option, you must save the memory manually to make the new setting persistent!
- Pause length
Time in milliseconds a program pauses during execution when it encounters an f PSE statement. The valid range is
This is also the time the display update is deferred after releasing the last key in f PREFIX, g MEM and f i.
- Delay value
Time in milliseconds a program pauses after each statement. A value of around 100 gives a good impression of the performance of the real HP-15C. A value of 0 gives maximum performance.
- Use "C locale" for clipboard
If this option is checked, a period is used as decimal point in the clipboard. The setting is independent of the current display settings for the decimal point and the digit separator.
Default: not checked
- Copy program when in PRGM mode
By default, pressing Ctrl–C copies the content of the X-register to the clipboard. If this option is checked and the Simulator is inPRGM mode is on, Ctrl–C instead copies the program code to the clipboard.
Default: not checked
- Program mnemonics
If this option is checked, the program pop-up menu (Alt–S) displays program steps as mnemonics. If unchecked, program steps are displayed with their key codes. Please note that this setting does not affect the display.
- Coloured program menu
If this option is checked, the program pop-up menu will show LBL, RTN, GTO and GSB statements coloured.
- Lines per column in program menu
The program pop-up menu displays the program steps in a multi-column format. This value defines the number of program steps per column.
- Register and label addresses with decimal point
This option controls how addresses of storage registers and labels between 10 and 19 are displayed. When enabled, the address is formatted with a decimal point, e.g.
.0, and as two-digit integer, e.g.
10, when disabled.
The option changes the format in the following situations:
- Storage register menu
- Documentation dialogue
- HTML export
Default: not checked
- Two-column storage menu
By default, the storage pop-up menus show the available data storage registers in two columns. Uncheck this setting if you want the storage menus with all data storage registers displayed in one column.
- Show menu
Under Windows and Linux operation systems, a menu is shown at the top of the simulator window.
Under Mac OS X, the menu bar on top of the screen is always on.
Default: not checked (always checked under Mac OS X)
This allows the user to set the language for menus and pop-ups. By default the system language is used. If this language is not supported, British English is selected.
The new setting is immediately active, except for the Preferences dialogue box. This dialogue box shows the new language the next time it is opened.
- Encode programs in UTF-16 (LE)
By default, program files are encoded in UTF-16 (LE). Uncheck this option to encode them in the system default encoding.
Please note that HTML exports are always UTF-8 encoded.
- Structure in English
This settings determines which language is used for HTML headlines (
<h#>), such as "Program Title", "Usage", etc., when exporting a program description to an HTML file. If this option is checked, British English is used; if the option is unchecked, the currently selected menu language is used.
This setting has no effect on the text of the program description.
- Indent subroutines
If this option is checked, subroutines in the HTML export are indented to show the program structure. The beginning of a subroutine, f LBL A…E, and the end, g RTN, are not indented.
- Warn on missing documentation
If this option is checked, a warning message is shown if you save a file as HTML and one of the following elements is empty:
- Program Title
- Single-column program listing
By default, the program listing uses one column for programs up to 25 steps, two columns for up to 50 steps and three columns for programs with 51 or more steps. If this option is checked, the program listing will always use only one column.
Default: not checked
- Keys in black and white
By default, the keys are printed in color, as on the real HP-15C. Enable this option to print them in black and white.
This can helpful if you print out the documentation on a black and white printer, e.g. a laser printer.
Default: not checked
- Font set
The Simulator layout depends very much on the combination of fonts, font sizes and display resolution. The Simulator therefore provides predefined font sets for common display resolutions. These font sets have been finely adjusted to achieve a good reproduction of the real HP-15C body aspect ratio which meets the `Golden Ratio´.
The following table lists the available font sets for each platform and display resolution:
Platform Font set Size Fonts used in set UNIX/Linux
DejaVu fonts small, normal, large and huge DejaVu Sans Microsoft fonts small and normal Arial
Microsoft Sans Serif
Microsoft fonts small, normal, large and huge Arial
Microsoft Small Fonts
Microsoft Sans Serif
- The "HP-15C Simulator Font" is used with all sets.
- If you want to change fonts or font sizes or add new font sets, you will need to edit the Simulator source code. I suggest not changing existing font sets at all.
- "DejaVu" fonts can be found on the Internet (see the links page).
- Extended Unicode chars for key faces
The simulator can make use of specific Unicode characters to make the key faces look more like the original HP-15C key faces.
Linux distributions come with the "DejaVu" fonts which provide all necessary characters. Under Microsoft Windows "Arial Unicode MS" (a unicode version of the standard "Arial" font) which is included in recent versions of "Microsoft Office" may be sufficient (depending on the Office/font version). As a fallback you can also install "DejaVu" fonts under Windows.
If you have checked this option and a character is not available you will see key faces like
instead of or instead of .
You should then uncheck the option or install a suitable font.
Default: checked, if "DejaVu Sans" font is available at first time start; not checked otherwise
Help File Browser
This setting allows you to set the browser used to display the online help.
When you run the Simulator for the first time, or if no browser is set, the Simulator checks for available browsers in all
directories given by the "
PATH" environment variable. If available, the operating system's default method to
open a Web page is added at the top of the browser list. This results in the following list of possible browsers per operating system:
- open in the Mac OS list will always run the default browser.
- start in the Windows list will always run the default browser.
- hh is the browser used with the online help on Windows XP/Vista/7.
All browsers found will be listed, and the first from the list will be set as the help file browser. You can choose another browser from the list or select one using the Browse… button
This section describes the differences between the real HP-15C and the Simulator.
- Register organisation
The memory of the real HP-15C is organised in 67 registers with 7 bytes each. Registers are shared between the data pool and the common pool. The data pool contains registers that are used for storage operations. The common pool contains free registers that can be used for program steps, matrix operations, complex numbers and temporarily by SOLVE and ∫yx. To redefine the number of registers in the data pool, type in the number in the X register and key in the sequence f DIM (i).
The Simulator `memory´ is not organised in registers. This is less important, since the HP-15C has only one function that gives the user knowledge of the internal structure: g MEM. The Simulator fully mimics the behaviour of that function, so that there is no visible difference between the Simulator and the real HP-15C.
- Number encoding
The real HP-15C uses Binary Coded Decimal (BCD) to encode decimal numbers. The simulator uses the IEEE encoding of the Tcl/Tk run time environment. With BCD, numbers like
0.0006can be represented exactly, it is encoded as
06000000000996. See The Museum of HP Calculators for a detailed description. On the other hand, the IEEE encoding is always only an approximation to a real number. This can lead to differences in the results as shown in the following example:
Key sequence Display 7 . 0 0 5 7.005 f FIX 2 7.01 1 + 8.01 8 . 0 0 5 − -1.78 -15
0.00, and that is what the real HP-15C displays: In BCD all the numbers used here can be represented exactly. The IEEE encoding leads to rounding errors which yield a result other than null.
The Simulator uses the Simpson method to compute an integral; the HP-15C uses the Romberg method.
I compared results from the Simulator and the HP-15C, and found that the Simulator produces comparable results in less time.
The real HP-15C uses a modified Romberg method to find the roots of an equation. The Simulator uses the `Regula Falsi´ method.
There are small differences for results with large exponents. For example, the root for "
x4 = 0" is computed as "
1.5060 -25" on the real HP-15C and as "
3.8481 -14" on the Simulator.
- Matrix operations
Matrix operations are not supported and I have no plans to add this feature.