The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

Rounding of 10^x
Message #1 Posted by Olivier De Smet on 26 Aug 2013, 9:06 a.m.

By playing on various of my emulators I observe the classical behavior :

8 ENTER 10^X -> 9999999.60 on pre HP67 model and 100000000 after ...

By looking at DATES the 67 was intro on 7/76

My question is the following:

The 25 was intro on 8/75 and my emulation go25c gives 9999999.60 BUT the 25C was intro the same day as the 67, and my question is about its rom, is it the same as the 25 or was it corrected as on the 67 ? (in fact I don't know if I use a 25 rom or a 25C one ...)

Same apply on the 29C et all,

Could you confirm the behavior for the 25, the 22, the 91, the 27 the 25C, the 19C ...

Just for curiosity :)

Edited: 26 Aug 2013, 9:10 a.m.

      
Re: Rounding of 10^x
Message #2 Posted by Andrés C. Rodríguez (Argentina) on 26 Aug 2013, 10:32 a.m.,
in response to message #1 by Olivier De Smet

Just from memory, I think that the 25 and 25C had the same behavior, and I believe some improvements in math functions appeared in the 29C. For instance, (-8)^(1/3) gives -2 in the 29C, but not in previous models.

Just my AR$ 0.1

            
Re: Rounding of 10^x
Message #3 Posted by Thomas Klemm on 26 Aug 2013, 3:21 p.m.,
in response to message #2 by Andrés C. Rodríguez (Argentina)

Quote:
For instance, (-8)^(1/3) gives -2 in the 29C

That's amazing! Are you sure about that? How could you enter 1/3?

Cheers
Thomas

                  
Re: Rounding of 10^x
Message #4 Posted by Andrés C. Rodríguez (Argentina) on 27 Aug 2013, 8:44 a.m.,
in response to message #3 by Thomas Klemm

As I said, these comments are just from some 35 years old memories, I don't have a 29C to try, but I do recall there was an improvement in the management of integer powers of negative numbers. It's very likely I made a mistake yesterday and the correct example should have been (-2)^3 = -8. My apologies.

                        
Re: Rounding of 10^x
Message #5 Posted by BShoring on 27 Aug 2013, 11:16 p.m.,
in response to message #4 by Andrés C. Rodríguez (Argentina)

There is a related issue in the earliest HP's.

If you take 1.000001 to the power of 1 million you get the value "e" (2.718281828). On the scientifics, this isn't of much use, but for a financial like the HP-80, it gives you an easy way to get "e."

The classics and earliest Woodstocks get this result, but I believe later Woodstocks do not.

Bob

      
Re: Rounding of 10^x
Message #6 Posted by Dieter on 26 Aug 2013, 3:08 p.m.,
in response to message #1 by Olivier De Smet

There is a simple answer to this: early HP machines did not benefit from the three additional guard digits that were introduced later, around 1976. That's why you get the mentioned result with 10 digits working precision - both for the result as well as for internal calculations:

  10^8
= e^(8 * ln 10)
= e^(8 * 2,302585093)   ' ln 10 rounds very nicely to 10 digits,
= e^18,42068074         ' but 8 * ln 10 does not - the exact result
                        ' is nearly halfway between ...74 and ...75
= 99999999,60...
This topic was discussed in HP Journal 11/1976, page 16 f.: "The new accuracy - making 2^3 = 8", here with regard to the then new HP-91. Several examples for roundoff errors of earlier HPs are given, very similar to the one you posted, e.g. 9^5, 25^5, 10^52 etc.

Dieter

            
Re: Rounding of 10^x
Message #7 Posted by Matt Agajanian on 27 Aug 2013, 12:30 a.m.,
in response to message #6 by Dieter

In light of these precision errors, how was it that users of the Classics and Woodstocks (or desktop predecessors) could compensate for these inaccuracies?

                  
Re: Rounding of 10^x
Message #8 Posted by Paul Dale on 27 Aug 2013, 1:25 a.m.,
in response to message #7 by Matt Agajanian

Compare the inaccuracy here with that of a slide rule.

- Pauli

                        
Re: Rounding of 10^x
Message #9 Posted by Dieter on 28 Aug 2013, 6:33 a.m.,
in response to message #8 by Paul Dale

Compare it to the inaccuracy that's still present on today's machines: let's consider the yx function, which is evaluated as e x ln y.

On classic HPs with a working range up to 9,999...E+99, the largest possible exponent in this equation is 230,25..., so that even a perfectly rounded 10-digit result still may have an absolute error of +/- 5E-8 in the exponent. Which quite exactly equals a relative error of 5E-8 in the final result, i.e. up to 5 units in the 8th significant digit. So the result has merely 7 digits that can be trusted. The loss of accuracy is caused by the three digits in the integer portion of the exponent (230). Maybe this was (one) reason why HP chose to add three guard digits in the mid-seventies, and not two or four. So far, so good.

Things get worse as soon as the mentioned exponent may get larger: in current 12-digit machines with working range up to 9,999...E+499 it may exceed 1000 (up to 1151,29...) an thus four digits are lost. Since there are still no more than three internal guard digits, roundoff errors similar to those discussed for early HPs may show up in the last digit. Try this e.g. with an HP35s:

 10 [ENTER] 450,9 [yx]   7,943 2823 4729 E+450
 450,9  [10x]            7,943 2823 4729 E+450
 
 correct result          7,943 2823 4724 E+450

10 [ENTER] -450,1 [yx] 7,943 2823 4719 E-451 -450,1 [10x] 7,943 2823 4719 E-451   correct result 7,943 2823 4724 E-451

Dieter

Edited: 28 Aug 2013, 6:41 a.m.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall