For which models was 2^3>8?

04042017, 05:03 AM
Post: #1




For which models was 2^3>8?
According to my best attempt to pinpoint the moment when 2^3 began to equal 8 in the evolution of HP calculators, I've compiled the following partial table of model introductions in historical order:
HP35 197207 HP80 197302 HP56 197304 HP66 197304 HP45 197305 HP65 197401 HP70 197408 HP55 197501 HP21 197502 ??? HP25 197508 2^3>8 ======================== HP22 197509 2^3=8 HP91 197603 HP27 197605 HP25C 197607 ??? HP67 197607 HP97 197607 HP10 197707 HP29C 197707 HP92 197707 HP19C 197709 HP97S 197712 Therefore the accuracy improvement seems to have happened between the inaccurate HP25 (introduced August 1975) and the accurate HP22 (introduced one month later). HOWEVER that leaves me with two questions: (1) This implies that the HP21 used the old inaccurate math, but I don't have one to verify that on. Could somebody with a real physical HP21 (no simulators please) please check whether it returns 8.000000002 or exactly 8? Be sure to set DSP 9 of course. (2) This also implies that the HP25C is more accurate than the HP25, which I highly doubt. Could somebody with a real physical HP25C (not 25, and no simulators please) please check whether it returns 8.000000002 or exactly 8? Be sure to set FIX 9 of course. Thanks in advance! <0ɸ0> Joe 

04042017, 06:26 AM
Post: #2




RE: For which models was 2^3>8?
Joe
8.000000002 on my 21 S/N 1508s Also 8.000000002 on my 25C S/N 1805S 

04042017, 12:17 PM
Post: #3




RE: For which models was 2^3>8?
(04042017 06:26 AM)james summers Wrote: 8.000000002 on my 21 S/N 1508s Thanks, James! That completes the table. <0ɸ0> Joe 

04042017, 01:05 PM
Post: #4




RE: For which models was 2^3>8?
Fortunately, the only two Woodstocks I have were the ones that were needed!


04042017, 03:28 PM
Post: #5




RE: For which models was 2^3>8?
I should check my Sinclair Cambridge Programmable. I think we'll be lucky if it's accurate to more than 2 significant figures.


04042017, 05:20 PM
(This post was last modified: 04042017 05:21 PM by pier4r.)
Post: #6




RE: For which models was 2^3>8?
Why does it happen?
I mean if it would be , say, \( 169^{0.5} \) I could understand computation errors, but \( 2^3 \) seems pretty straightforward to me, it is even a base two power. So does anyone have an explanation for it? It would be interesting. Wikis are great, Contribute :) 

04042017, 05:51 PM
(This post was last modified: 04042017 05:58 PM by Dieter.)
Post: #7




RE: For which models was 2^3>8?
(04042017 05:20 PM)pier4r Wrote: Why does it happen? The explanation is simple and straightforward: y^{x} is calculated as e^{x · ln y}. So 2³ is not evaluated as 2·2·2 – how far should this go? Up to the 4th power? the 5th? The 10th? That's why 2³ is calculated as e^{3 · ln 2}. With 10digit precision the exponent is 3 · 0,6931471806 = 2,079441542 and the exponential of this is 8,0000 00002 56... Especially powers of 2 (and 5) are prone to such roundoff errors because of the rounded 10digit logarithm. This improved as the calculators internally used a higher precision than displayed. Since 1976 most HP 10digit calculators work with 13digit internal precision – and the problem is solved. Well, in most cases, that is. ;) More details can be found in the November 1976 issue of HPJournal, p. 16 f. BTW, evaluating x³ by using the y^{x} function always has been a quite bad idea. Beside the accuracy issue this method is sloooow. Remember: there are two transcendental functions involved in every simple power calculation. On classic HPs you can see the display go blank for a short moment during such power calculations – simply because the operation takes that much time. A much better way is [ENTER] [x²] [x] or [x²] [LastX] [x] which even sets LastX correctly. Some newer calculators even allow [x²] [RCLx]L which does it all in the Xregister. BTW2: Your example 169^{0,5} can be evaluated by the square root function which uses a completely different approach that does not cause the mentioned errors (and is also much faster). And the fact that 2³ is a base 2 power does not mean anything on a calculator that uses real BCD arithmetics, i.e. base 10. BTW3: Who cares about the 10th digit? My first calculator returned exactly 5 (five!) significant digits of all transcendental functions. ;) Dieter 

04042017, 06:10 PM
(This post was last modified: 04042017 06:11 PM by pier4r.)
Post: #8




RE: For which models was 2^3>8?
Thanks Dieter! Yes I choose the square root of 169 because as far as I know it involves a bit of calculations and it could lead to errors.
For the \( e^{x \cdot ln(y)} \) I did not think they would use that unless rational numbers were used as input. For special cases, like 2, I also thought about shortcuts ( shifting bits ). Well, once again, today I learned. Wikis are great, Contribute :) 

04042017, 06:16 PM
Post: #9




RE: For which models was 2^3>8?
Great explanation Dieter. Interesting side note: On the HP35 doing x^y the display goes blank for a split second, but on the HP80 doing y^x causes the display to flicker as if it is running a program. I have to wonder if the HP80 was programmed differently in order to pack so many functions (programs actually) into it.
Regards, Bob 

04042017, 06:45 PM
(This post was last modified: 04042017 06:53 PM by james summers.)
Post: #10




RE: For which models was 2^3>8?
Thanks for the great explanation, Dieter.
Just playing around, my MK61, after a slight pause gives 7.9999993. Doing [2] [ENTER] [ln] [3] [x] [e^{x}] also gives 7.9999993. The 25C is more accurate, but similar, in that [2] [ENTER] [3] [y^{x}] and [2] [ENTER] [ln] [3] [x] [e^{x}] both give 8.000000002. However, my 32E, 41CV and 15C, whilst giving [2] [ENTER] [3] [y^{x}] as 8.000000000, for [2] [ENTER] [ln] [3] [x] [e^{x}] they give 8.000000003. Edited to add for Dave that my Sinclair Cambridge Scientific, which doesn't have the luxury of a [y^{x}] key, gives 7.9998. 

04042017, 07:18 PM
(This post was last modified: 04042017 07:19 PM by Dieter.)
Post: #11




RE: For which models was 2^3>8?
(04042017 06:45 PM)james summers Wrote: Thanks for the great explanation, Dieter. Interesting. Without guard digits it should be 7.9999973. What are the intermediate results you get for ln 2 and 3x this? (04042017 06:45 PM)james summers Wrote: The 25C is more accurate, but similar, in that [2] [ENTER] [3] [y^{x}] and [2] [ENTER] [ln] [3] [x] [e^{x}] both give 8,000000002. The 25 uses 10 digits as opposed to 8 in the MK61. (04042017 06:45 PM)james summers Wrote: However, my 32E, 41CV and 15C, whilst giving [2] [ENTER] [3] [y^{x}] as 8.000000000, for [2] [ENTER] [ln] [3] [x] [e^{x}] they give 8,000000003. Why do you add an [ENTER] before the log? It's classic RPN. ;) The HP32/41/15 of course use the "new accuracy" since 1976 with three additional guard digits. That's why even with a manually calculated exponentional you get the correctly rounded value ...003. The difference to the HP25 result ...002 is probably due to different algorithms and/or rounding methods. In 1976 there were more improvements than just adding the guard digits, cf. the mentioned HP Journal article. BTW, if you do not have access to the latter: most of the interesting stuff is available on hpl.hp.com. Dieter 

04042017, 07:42 PM
Post: #12




RE: For which models was 2^3>8?
(04042017 07:18 PM)Dieter Wrote:(04042017 06:45 PM)james summers Wrote: Thanks for the great explanation, Dieter. [2] [ln] = 6.9314717 E01 [3] [x] = 2.0794415 [e^{x}] b = 7.9999993 (04042017 07:18 PM)Dieter Wrote:(04042017 06:45 PM)james summers Wrote: However, my 32E, 41CV and 15C, whilst giving [2] [ENTER] [3] [y^{x}] as 8.000000000, for [2] [ENTER] [ln] [3] [x] [e^{x}] they give 8.000000003. Because I'm an idiot! ;) 

04042017, 07:53 PM
Post: #13




RE: For which models was 2^3>8?  
04042017, 10:14 PM
Post: #14




RE: For which models was 2^3>8?
Because the earliest calculators didn't have the 3 guard digits, you could do 1.000001 Enter 1,000,000 y^x and get e (2.718281828). This doesn't work on the HP22 and later calculators. The first 2 financial calcs don't have e^x.
Regards, Bob 

04042017, 10:26 PM
Post: #15




RE: For which models was 2^3>8?
(04042017 05:51 PM)Dieter Wrote: The explanation is simple and straightforward: y^{x} is calculated as e^{x · ln y}. How about all the way? It's really quite efficient if you use exponentiation by squaring: x^n = (x^(n/2))^2 if n is even, and x*(x^((n1)/2))^2 if n is odd; apply recursively or iteratively. The algorithm is O(log(n)). This is how Free42 gets 2^3=8 exactly, despite not using extended precision for intermediate results. 

04052017, 07:50 AM
Post: #16




RE: For which models was 2^3>8?
(04042017 06:16 PM)bshoring Wrote: Great explanation Dieter. Interesting side note: On the HP35 doing x^y the display goes blank for a split second, but on the HP80 doing y^x causes the display to flicker as if it is running a program. I have to wonder if the HP80 was programmed differently in order to pack so many functions (programs actually) into it. I know I know, so simulators :) Just curious though, the simulators returned the same results The HP35 took 1720 instructions to process so about 1/2 second display off time assuming 800KHz clock. The HP80, HP70 leave the display on for calculations because they can take a lot of time to process some financial problems. That way the user knows it is busy. The HP80 took 1546 instructions to process and the HP67 took 1632. cheers Tony 

04052017, 11:34 AM
Post: #17




RE: For which models was 2^3>8?
(04042017 10:26 PM)Thomas Okken Wrote:(04042017 05:51 PM)Dieter Wrote: The explanation is simple and straightforward: y^{x} is calculated as e^{x · ln y}. I'm guessing they didn't want to spend the probably very limited ROM/RAM space of the old models to handle special cases of powers like that. 

04052017, 06:08 PM
Post: #18




RE: For which models was 2^3>8?
(04052017 07:50 AM)teenix Wrote:(04042017 06:16 PM)bshoring Wrote: Great explanation Dieter. Interesting side note: On the HP35 doing x^y the display goes blank for a split second, but on the HP80 doing y^x causes the display to flicker as if it is running a program. I have to wonder if the HP80 was programmed differently in order to pack so many functions (programs actually) into it. Tony, thanks for enlightening me on why this function operates differently on the HP80 from the HP35. I have both actual calculators, so it's fun to see the differences. I've also downloaded your simulators for the 70 & 80, and I am very impressed. Yes, they operate just like the originals. Regards, Bob 

06232020, 04:39 AM
(This post was last modified: 06232020 04:40 AM by Andres.)
Post: #19




RE: For which models was 2^3>8?
It has been said already, but just in case... The HP=25 needed to allocate ROM space for programmable functions, but the HP22 and the HP27 were not programmable, so there was more ROM space available to put more sophisticated code for these math functions. While the HP21 was not programmable indeed, it has no memory (apart from ACT registers) and I guess its ROM space was also limited. By the time HP29C, 19C, 91, 67, 97 appeared, more ROM space was feasible and the improved routines became standard.
Andrés C. Rodríguez (Argentina) Please disregard idiomatic mistakes. My posts are mostly from old memories, not from current research. 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)