The Electric HP-25 Calculator Test
Thanks for helping me test my program.
...but maybe you ought to read the directions first:
I put the applet on a separate page so you can view these directions in
one window and play with the applet in another, or in the unlikely event
that loading the applet locks up your computer, you can come back here
and report the problem.
to report problems to email@example.com (Lawrence Leinweber)
Here's what the applet's supposed to do:
Download about 130 Kbytes of stuff. This may take as long as two minutes,
with your modem lights flashing almost the entire time.
When that's done, draw, inside a web page, a 64 by 64 pixel square
of an HP-25 calculator button. Click on the button when it appears.
Then, draw, inside a separate window, a 306 pixel wide by 567 pixel high
of an HP-25 calculator, with "0.00" on the LED display of the calculator.
That might not happen instantly, but typically in not more than a second.
(Clicking the button a second time toggles the window from shown to hidden.)
If your screen isn't tall enough, a scroll bar should appear at the right.
The scroll bar should let you see the whole calculator image.
To work the calculator, press the keys using your mouse. There are also
two small slide switches below the LED display and above the keys. These
move left and right by dragging them with your mouse.
The slide switches and keys are animated. The slide switches should seem
to move realistically. The keys are unusual and should seem to pivot along
their lower edges, moving toward the top.
If you leave the mouse over a slide switch or key for one second, a hint
should appear in square brackets on the title bar of the window. The hint
is the function or prefix that will happen if the key is pressed. In many
cases, prefix keys change the function associated with a key.
The display should look like a real LED display and the calculations should
work. If you don't know how HP (Hewlett-Packard) calculators work, press
7, ENTER, 4, +, for example, to add 7 + 4 and get 11. To see more digits,
press f, FIX, 9. (f is the yellow key and FIX is the SST key.)
The slide switches are initially toward the right. Moving the left slide
switch toward the left turns the calculator off. The right slide switch
can put you in "program" mode.
The calculator should behave exactly like a real HP-25 except for computational
Overflow occurs above 9.9999999e99, underflow below 1.0e-99, as in the
Trig functions for exact 1/4 circle angles in degrees and grads modes should
give results exactly like the real calcuator.
Conditional branch instructions (which require a test for equality) are
approximated near ten digits of accuracy, within an order of magnitude
of the real calculator.
Here's what the applet doesn't do:
It can't make your computer faster, so some delays can occur depending
on your hardware.
It doesn't make Java work on your browser if you haven't got it.
Computational accuracy isn't duplicated: This simulation computes to about
17 digits. The real calculator is accurate to about 10 digits. For example,
the same calculation might produce 32169908.78 on the real calculator and
32169908.77 on the applet.
Trig functions for very large angles are always taken as zero in the simulation.
When a program is running, the LED segments of the display of the real
calculator flicker in complex ways, and often looks like a blur of almost
all segments. The simulation displays "-88888888888".
Instructions require a non-trivial period of time on the real calculator,
depending on the complexity of the instruction. The simulation is probably
faster but adds a 1/10 second delay per instruction when a program is running
and adds 1 second for PAUSE.
When battery power is low on the real calculator, the first 8 decimal points
are lit (excluding the first digit, reserved for the minus sign), and not
the proper decimal point if among the 8, when displaying a number but not
while a number is being entered.
Your mouse buttons don't do justice to the action of real HP-25 keys ;-)
Here's what to look for:
Do the graphics work right? Do things get redrawn properly? There is a
graphic that starts the calculator window, a
graphic of the overall face of the calculator, graphics
for every key up and down, graphics
for each LED digit/decimal point combination (some combinations are
never generated) and 14 animation frames
for each of the 2 slide switches. Does the button appear? Does the
window alternately appear and disappear when the button is pushed? Try
sliding the switches, pushing all the keys and displaying all the digit
combinations you can. Does the program seem to be neglecting to draw some
If your screen isn't tall enough to show the entire calculator image, does
the scroll bar appear? Does it work?
Does the hint appear one second after the mouse is positioned over a key
or slide switch? Press a prefix key, especially f, g, STO, RCL or GTO,
before moving the mouse over another key to see most of the other functions.
If you have an option on your browser to show the "Java Console", does
it show any error messages? What does it say?
Is the redrawing or animation extremely slow?
Do you think the animation looks bad? Do you want to help?
Is there a stupid "Diagnostic" window on your screen (because I forgot
to take it out)?
If you type in a ten digit number and press ENTER, does it get ruined?
(It is normal for the calculator to display two digits after the decimal
point unless you change the display format.)
Are the calculations correct? Is the functional behavior correct? Are there
any obscure behavioral details of the HP-25 that I overlooked?
What's really bad? Under what circumstances does the problem occur consistently?
Can you generalize the circumstances?
What's OK but could use improvement? What would make all your dreams come
What do you know about the HP-25? What do you know about computers?
What do you know about photography or graphical art?
What kind of computer are you using? How fast? How much memory?
Which browser are you using? What version? Which operating system
are you using?
Here's the stuff:
The applet per se is public domain, but the code is ugly. I had a peculiar
combination of design goals, none of which were making the code instructive,
maintainable, expandable, elegant or sexy.
Images are Copyright David G. Hicks, 1995, 1996, and 1997. You may use
them for non-commercial purposes as long as they are properly attributed.
(Regrettably, portions of the images are my own doing.) The applet has
been donated to The Museum of HP Calculators.
On display at the Museum:
Return to Larry's Cerebral Snack Bar