Wiki page
[PCalc vs HP] by
tangent
2025-09-19 01:31:20.
D 2025-09-19T01:31:20.571
L PCalc\svs\sHP
N text/x-markdown
P fe9e1993183aa4b7c7bcac29ccb6c639aabb2bf2819712a52978d1b522dece4b
U tangent
W 15986
## Motivation
It all began with my project to develop an [HP-32S Layout for PCalc](HP 32S Lite Layout for PCalc).
At first, it was a purely surface-level clone of the primary functions, but as I delved deeper into secondary functions and submenus, I found myself needing to compare the two designs on a detailed level. My notes on these differences grew to the point that they spawned this article.
I continue to use a [late 1980s hardware design][HP32S] as my primary point of comparison since it provides a nice balance point in their design evolution. Function-wise, it does nearly all of what the three primary models in the more primitive [Voyager] series can do, combined, yet it is not complicated to the point that my intended project of approximating its scope of functions within PCalc is hopeless. As evidence for this last, note the brevity of the [list of HP-32SII features in my layout][IILite].
On the chance that the author of PCalc is reading this, he is welcome to take it as a list of potential future features, but do note that there is no priority given to any of these. Given the power to dictate his development schedule, I would of course have ideas for which ones to pursue first, but I do not actually _need **any**_ of this. The program has already justified what I spent on it for licensing and upgrades, and so I find myself without any power in the matter. If this compilation changes anything about the future path of PCalc, it will be pure bonus.
One may ask why I bothered to make this comparison at all, then. Initially, it was to explain assorted infidelities in my [HP-32S Lite layout project][32SLite], as a matter of documentation on what a user can expect from it. Later, I developed an academic interest in comparative tech archaeology, its interest inherent to a certain class of mind. đ€
[HP32S]: https://en.wikipedia.org/wiki/HP-32S
[32SLite]: /wiki?name=HP+32S+Lite+Layout+for+PCalc
[IILite]: /wiki?name=HP+32S+Lite+Layout+for+PCalc#32sii
[Voyager]: https://en.wikipedia.org/wiki/HP_Voyager
## <a id="imp"></a>Improvements
PCalc improves on HPâs obsolete hardware design in several areas:
* A vast set of built-in constants on the `42` button(^As far as I have been able to find, even the DM32 has but _two_ built-in nontrivial constants: _Ï_ and _e_, and the latter is hidden away in the internals.)
* A set of conversions on the `A>B` button that positively _spanks_ HPâs paltry offering(^I count a mere _six_ conversions in the HP-32S, twelve in the 32SII/[DM32], and approximately one bazillon in PCalc, round numbers. đ)
* Extensive customization via the `âïž` menu, without which [my 32S Lite project][32SLite] would have gotten nowhere
* By default(^There is 4-level stack limit option that allows it to better mimic the behavior of classic designs like the HP-32S, without which functions like ârollâ donât work as expected.) PCalc boasts a 128-level stack like HPâs graphing calculators, which is why it offers a `stack` button: to show all those numbers, which you could not otherwise remember. This feature also replicates the `VIEW` function of the 32S.
* PCalc is more accurate than an HP-32S owing to its use of modern 64-bit [IEEE-754][FP] calculations and not truncating each intermediate result to 12 BCD digits. I used the [calculator forensics algorithm](https://www.rskey.org/~mwsebastian/miscprj/algorithm.htm) to determine this, but rather than count zeroes or nines after the decimal point, I followed up by computing the log ratio(^_log<sub>e</sub>(ideal / actual)_; perfection is _ln(n/n)_ = 0) and then dropping the mantissa. The resulting exponent is all we need for a useful ballpark comparison measure:
* **HP-32S**: ~10<sup>-7</sup> (ditto HP-32SII since it uses the same processor)
* **PCalc, Apple A15**: ~10<sup>-11</sup> (ditto M4)
* **PCalc, Intel i9**: ~10<sup>-13</sup>
What this says is that PCalc is _at least four orders of magnitude more accurate_ than the 1980s era hardware design on this test. Not bad!
Yet, the SwissMicros [DM32] trounces them all with its 128-bit floating point math, giving a log accuracy figure on the order ofâŠ
**10<sup>-30</sup>** !!!
Be careful, though. The DM32 display can fool you as a result of the designerâs choice to mimic the HP-32S in displaying 12 digits. Since the first inaccuracy is far beyond that point, it correctly rounds to a perfect â9.â You have to press `SHOW` to see that it does eventually lose accuracy. Thus the value of the log ratio test against an _actual_ perfect score: even down at this extreme, it gives a useful nonzero result.
[DM32]: https://www.swissmicros.com/product/model-dm32
[e]: https://en.wikipedia.org/wiki/E_(mathematical_constant)
[FP]: https://en.wikipedia.org/wiki/IEEE_754
## <a id="missing"></a>Missing Features
Alas, it doesnât go all PCalcâs way. There are quite a lot of missing features relative to ye olde HP-32S:
### <a id="prog"></a>Programmability
Primitive as the 32S programming features were compared to what you could do on a general-purpose computer of the same era â much less a modern machine â PCalc is not Turing-complete, whereas [a 32S is][TC].
That said, there is a surprisingly short list of things that PCalc would need to add to lift this limitation:
* numeric tests(^The HP [Voyager] series got by with just two â `x>0` and `xâ€y` â while the 32S expanded that to a comfortable eight, and the 32SII gave us a positively sybaritic _fourteen_ options!)
* labels on the âtape,â PCalcâs closest current equivalent to a program memory
* âgotoâ function for jumping to those labels, either directly or conditioned on the result of a test
* âreturnâ function for terminating replay of a command sequence
I am not certain whether adding indirect memory addressing(^What HP calls the _i_ register and the corresponding `(i)` function.) is strictly necessary to achieve Turing completeness, but it would close the final gap with the HP-32S on this front.
I express the list in terms of PCalcâs âtapeâ feature because that is how HP did it. They call it âkeyboard entry programming,â and it turns a passive record of past work into an intentional act. If we set that historical consideration aside, a more PCalc-native way of doing the same thing would be by extending the User Functions feature. To achieve this end, the same few features need to be added regardless.
[TC]: https://en.wikipedia.org/wiki/Programmable_calculator#Programming_languages
### <a id="complex"></a>Complex Numbers
Whereas a 32S implements complex numbers throughout the system, in PCalc theyâre an afterthought. The [HP-32S Ownerâs Manual][32SOM] devotes the seven pages of Chapter 9 to complex numbers, plus scattered references elsewhere in the book, but the PCalc manual devotes a single sentence to the topic, dominated by a link to the Wikipedia article on complex numbers ââŠfor people who need to work with this kind of math.â
Sigh.
[32SOM]: https://literature.hpcalc.org/items/697
### <a id="statistics"></a>Statistics
PCalc lacks all items in the [HP-32S Ownerâs Manual][32SOM] Function Index containing Σ and σ symbols. It has a few scalar primitives in this vein, but without foundational building blocks like data lists, it cannot even offer basics like summation.
### <a id="variables"></a>Variables
The 32S uses the overloaded 26 alphabetic keys for named variables with `STO`/`RCL`, but the PCalc implementation of multiple memories uses the single-digit system of HPâs [Voyager] series, giving ten ânamedâ memories. There is no equivalent to the manual variable management of the HP-15S, and you cannot use the OS keyboard to get alphabetic labels. When you say `STO` `1` in PCalc, it is literally storing it in memory #1, but on a 32S, it would put it in location âW,â the overloaded meaning of the `1` key in that context.
The 27th variable in the HP-32S is called _i_, whose special power is lost here due to lack of a memory reference feature. Thereâs a conflict to be aware of here: `STO` `.` on a 32S stores _x_ in register _i_, but on PCalc it sets **all** memory locations to that value. I believe this to be stock behavior of the PCalc `.` key which cannot be changed by the user.
There are another six statistics variables in these calculators which also have no equivalent in PCalc because it [lacks statistics features](#statistics).
### <a id="sto-arith"></a>Storage Arithmetic
The closest PCalc has to this HP feature works in the opposite direction and is limited to a single memory location, âM0.â
On a 32S, you can say `STO` `+` `A` to add the contents of the _x_ register to variable âA,â but when you press `STO` in PCalc, the operator keys all gray out, giving the false impression that it has nothing like storage arithmetic. What it _does_ provide is on the Functions → Memory menu in the macOS version. Take the Add Memory function, which adds the contents of the zeroth memory to the _x_ register, a function commonly labeled `M+` on other calculators.
PCalc has the other three basic operations plus a power-raising one, which we might label `M-`, `MĂ`, `MĂ·`, and `MËŁ`.
### <a id="matrix"></a>Matrices
These are entirely missing in PCalc.
## <a id="bif"></a>Built-in Function List Comparison
Another way of approaching these same conclusions is to compare the lists of âfunctionsâ each calculator boasts, emblazoned once upon a time on flashy retail boxes to justify price differences. Because the union set of all functions in this comparison comes to over 200, I choose to take an aggregate approach here rather than make you wade through a long data table. I did that work so you donât have to; youâre welcome!
These results are therefore not detailed, but they _are_ a useful distillation of the facts.
### HP vs PCalc, Fight!
I found it easiest to start with the [Function Index][DMFI] in Appendix D of the [DM32 Userâs Manual][DMUM], where they have already totaled up the count for us: 171 distinct functions. This list ranges from trivial features like `+` to deeply subtle and complicated ones like `â«` and `SOLVE`.
The 32SII lacks but one of these. While SwissMicros made [many enhancements][DMEnh] in the DM32 relative to its predecessor, the sole proprietary new function they added is related to their multiple state management feature set: `XEQ` `State`:`label`.
The 32S repertoire is another story. I took the âFunction Indexâ starting in its [Ownerâs Manual][32SOM] on p.286, then cross-referenced it against the DM32 list and counted 35 missing features, whose nature you may guess by reading the high-level comparative reviews you may find elsewhere online:
* fraction input/display
* improved equation editor
* expanded statistics facilities
* several more built-in unit conversions
One bit of noteworthy minutiae is that the 32S lacks the four âor equal toâ variants of the twelve conditional tests in the 32SII.
Doing the same job with PCalc was more work because its manual lacks the single consolidated list of its every function, as HP and SwissMicros provide in their manuals. I ended up doing it the other way around, starting from the DM32 function list and treating it as an index of possibilities. For each one, I went on a hunting expedition, hoping to locate a correspondence in PCalc proper or its manual.
The number I eventually came up with is 98 functions in common with the DM32 without resorting to user functions.(^If we allowed that, weâd have to allow user programs on the HP side, too, which would give the whole game away thanks to the good doctors Church & Turing. PCalcâs finite function list would end up being divided by infinity on the HP side owing to its programmability. While that is a true interpretation, it isnât particularly useful in this context, where the comparison is being made to the platform that _lacks_ programmability.) That leaves 73 missing, mainly in the areas already covered in prior sections.
One standout curiosity I came across is that the DM32 manual lists the parenthesis keys as âfunctions,â but while PCalc does have them for algebraic entry, I counted them as lacking here because in this context, it refers to argument grouping in the equation editor, a facility PCalc lacks.
### PCalc vs HP, Finishing Move!
I then went the other way, skimming through all those PCalc menus looking for functions that I didnât account for in the first pass above, implicitly meaning they arenât present in any member of the â32â line. Most fall into one of the categories listed [at the top of this article](#imp), but there are notable exceptions:
* drop(^The closest I can come to cloning that on a 32S is `CLEAR` `x` `+`: everything moves down one, and the T register is duplicated down into Z if you have PCalcâs four-register stack limit enabled. It may be viewed as the inverse of pressing `Enter` while the calculator is in stack-lift mode.)
* cube and cube root
* [modulo][mod] and remainder
* decrement and increment
* round to floor and ceiling(^HPâs `PARTS` `{IP}` is not _quite_ the same thing if negative values are a possibility.)
* percent of total and tax rate calculations _a la_ HP-12C
* reciprocal trig functions: cotangent, cosecant, secant, and their inverses
* [hypotenuse][hyp], plus âlegâ for computing one of the two orthogonal sides given the length of the other two
* computer arithmetic _a la_ HP-16C: bitwise logic operations, bit-shifting, endinanness swapping⊠It isnât enough to allow a _complete_ clone, mainly missing a word size setting and the option of selecting the way negative numbers are represented, but it does have interesting oddities like 3-bit shifts, as you might want when working with a 12-bit PDP-8, where several functions group bits into threes, not fours, resulting in octal being more useful than hexadecimal.
The links take you to HP-32S or 32SII implementations of these âmissingâ functions. The rest are all implementable as user programs, but you will have to seek these out on your own.
There is one other item we can put in PCalcâs column: the algebraic entry option. None of the â32â series has it, so we have to at least _mention_ this heresy, even if this _is_ an RPN site. đ
[DMUM]: https://technical.swissmicros.com/dm32/doc/dm32_user_manual.html
[DMEnh]: https://technical.swissmicros.com/dm32/doc/dm32_user_manual.html#_enhancements_over_hp_32sii
[DMFI]: https://technical.swissmicros.com/dm32/doc/dm32_user_manual.html#_appendix_d_functions_index
[hyp]: /wiki?name=Hypotenuse%20Program%20for%20HP-32S
[mod]: https://www.hpmuseum.org/software/32s2mod.htm
## <a id="license"></a>License
This work is © 2025 by Warren Young and is licensed under <a href="http://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank" rel="license noopener noreferrer">CC BY-NC-SA 4.0<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1"><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1"><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/nc.svg?ref=chooser-v1"><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/sa.svg?ref=chooser-v1"></a>
<div style="height: 50em" id="this-space-intentionally-left-blank"></div>
Z aca4c7c1f4703bc4732d2e7212592e58