HP Forums

Full Version: Rounding of 10^x
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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.

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

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

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

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

Compare the inaccuracy here with that of a slide rule.


- Pauli

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.

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

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.