Post Reply 
Small challenge
04-27-2023, 07:31 PM (This post was last modified: 05-01-2023 08:06 AM by J-F Garnier.)
Post: #34
RE: Small challenge
To go back to the source of the challenge, the 9825/9835/9845 actually are using a square and multiply method to calculate exponentiation with integer powers.
See the comments in the exponentiation code in this US patent for the 9825 (page 518 of the pdf).
Integer power must be understood in the context of these machines as -32768 <= power < 32768

Let's test the example cited in the code comments:
                        HP-9845                    Capricorn / Saturn
.999^(-32768) = 1.73014224633e14      1.73014224721e14

The Capricorn/Saturn result is exact to 12 digits, but the accuracy of the 9845 doesn't exceed 10 digits (within +/1 ulp) for this test.

We can reproduce the 9845's result with this command line on the 75C/71B:
>P=.999 @ FOR I=1 TO 15 @ P=P*P @ NEXT I @ X=1/P @ DISP X
1.73014224633E14

This demonstrates that the 9835/9845 didn't use internal extended precision for the exponentiation.
Yet the square and multiply method was more accurate than the y^x=exp(x*ln(y)) formula,
as demonstrated with 1/(.999^32768) = 1.73014204403e14 computed on the 9845.

So no, the 9835 was not more accurate than the Saturn (most of the time) !

It seems the HP-85 (1979) was the first HP desktop to use extended precision for internal calculations, probably using the experience of the accuracy improvement for handheld calculators (HP-22, 1976).

J-F
(9845 tests conducted on the MAME 9845 emulator).

Edit: rephrase "multiplication method" by "square and multiply method."
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Small challenge - J-F Garnier - 04-22-2023, 02:33 PM
RE: Small challenge - Valentin Albillo - 04-22-2023, 03:29 PM
RE: Small challenge - John Keith - 04-22-2023, 04:38 PM
RE: Small challenge - Massimo Gnerucci - 04-22-2023, 03:33 PM
RE: Small challenge - Valentin Albillo - 04-22-2023, 03:41 PM
RE: Small challenge - J-F Garnier - 04-22-2023, 03:41 PM
RE: Small challenge - Gerson W. Barbosa - 04-22-2023, 05:15 PM
RE: Small challenge - BruceH - 04-22-2023, 04:30 PM
RE: Small challenge - Gerson W. Barbosa - 04-22-2023, 05:29 PM
RE: Small challenge - Gerson W. Barbosa - 04-28-2023, 12:52 AM
RE: Small challenge - J-F Garnier - 04-28-2023, 07:13 AM
RE: Small challenge - J-F Garnier - 05-16-2023, 06:57 PM
RE: Small challenge - robve - 05-18-2023, 03:16 AM
RE: Small challenge - C.Ret - 04-22-2023, 06:30 PM
RE: Small challenge - Thomas Klemm - 04-22-2023, 07:24 PM
RE: Small challenge - J-F Garnier - 04-22-2023, 09:42 PM
RE: Small challenge - Guenter Schink - 04-25-2023, 09:56 PM
RE: Small challenge - John Keith - 04-25-2023, 11:46 PM
RE: Small challenge - Dave Britten - 04-27-2023, 02:30 PM
RE: Small challenge - Valentin Albillo - 04-23-2023, 12:58 AM
RE: Small challenge - C.Ret - 04-23-2023, 06:24 AM
RE: Small challenge - EdS2 - 04-23-2023, 08:00 AM
RE: Small challenge - robve - 04-23-2023, 11:10 AM
RE: Small challenge - robve - 04-23-2023, 01:01 PM
RE: Small challenge - robve - 04-23-2023, 01:56 PM
RE: Small challenge - EdS2 - 04-23-2023, 02:08 PM
RE: Small challenge - J-F Garnier - 04-23-2023, 02:13 PM
RE: Small challenge - John Keith - 04-23-2023, 06:41 PM
RE: Small challenge - J-F Garnier - 04-24-2023, 10:11 AM
RE: Small challenge - Albert Chan - 04-24-2023, 12:58 PM
RE: Small challenge - brouhaha - 04-24-2023, 05:32 PM
RE: Small challenge - Albert Chan - 04-24-2023, 01:07 PM
RE: Small challenge - robve - 04-28-2023, 08:37 PM
RE: Small challenge - J-F Garnier - 04-24-2023, 01:35 PM
RE: Small challenge - John Keith - 04-24-2023, 06:54 PM
RE: Small challenge - Christoph Giesselink - 04-25-2023, 07:13 PM
RE: Small challenge - J-F Garnier - 04-25-2023, 08:49 PM
RE: Small challenge - J-F Garnier - 04-26-2023, 07:51 AM
RE: Small challenge - J-F Garnier - 04-27-2023 07:31 PM
RE: Small challenge - EdS2 - 04-28-2023, 08:53 AM



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