Approximate pi to 24 digits via keyboard
|
02-02-2015, 02:43 AM
Post: #21
|
|||
|
|||
RE: Approximate pi to 24 digits via keyboard
(02-01-2015 10:25 PM)Dieter Wrote:(02-01-2015 09:17 PM)Rick314 Wrote: (I checked with extended-precision software and Dieter's 3 answers are indeed the best 12-digit answers possible. They are also what my HP-35S returns, so kudos to the HP-35S same as for its sin(x) algorithm.) I don't think there is any "relative error" on the 3 different inputs, and the 3 different answers are the correct 12-digit answers. Not all other 12-digit HP calculators, only the HP-33s from which the HP-35s inherited this and many other bugs. These are the HP-42S results: Code:
Gerson. |
|||
02-02-2015, 02:57 AM
(This post was last modified: 02-02-2015 03:00 AM by Gerson W. Barbosa.)
Post: #22
|
|||
|
|||
RE: Approximate pi to 24 digits via keyboard
(01-31-2015 07:11 AM)Dieter Wrote:(01-30-2015 08:38 PM)Gilles Wrote: It works with the 48SX - 49 -50. Yes, I get extra digits on my HP-15C and even on my HP 12c Platinum :-) (*) HP-15C: 3.1415 92653589(87) Keystrokes: g RAD 3.1415 SIN f CLEAR PREFIX HP 12c Platinum: 3.1415 926535(9574) Keystrokes: g GTO 273 R/S 3.1415 R/S f CLEAR PREFIX Gerson. (*) Mine is actually a 12c Prestige |
|||
02-02-2015, 06:56 AM
Post: #23
|
|||
|
|||
RE: Approximate pi to 24 digits via keyboard
(02-02-2015 02:57 AM)Gerson W. Barbosa Wrote: Yes, I get extra digits on my HP-15C and even on my HP 12c Platinum :-) (*) Extra digits don't mean extra accuracy. ;-) The 15C (and probably also the 41C) essentially show the same behaviour as the 35s. First the result becomes slightly inaccurate, then the final digits are lost: (02-02-2015 02:57 AM)Gerson W. Barbosa Wrote: HP-15C: ...while it should be 3.1415 9265358966 So the last two digits are off. As we move closer to pi the result loses digits: for instance sin 3,14159 is returned as 2,65359 E–6. The best we can squeeze out of the 15C is 3,141592653590 – that's pi rounded to 13 digits. So no miracles on this side either. ;-) Dieter |
|||
02-02-2015, 06:46 PM
(This post was last modified: 02-02-2015 06:50 PM by Rick314.)
Post: #24
|
|||
|
|||
RE: Approximate pi to 24 digits via keyboard
(02-01-2015 10:25 PM)Dieter Wrote: But you should not be too generous with your kudos: take a look at these results by the 35s and probably also other HPs... Thank you Dieter. I found your table very interesting and quite a disappointment. It should be added to the HP-35S Bug List. I think what you showed are definitely defects, and worse than most others in the Bug List. The calculator isn't calculating right. For comparison, I checked my old HP-32SII against the UNIX/Cygwin "bc" extended-precision program (mantissas only displayed for it): Code:
Update: I had this post composed before seeing the 42S results posted by Gerson W. Barbosa. As expected the 42S and 32SII agree. |
|||
02-02-2015, 11:01 PM
Post: #25
|
|||
|
|||
RE: Approximate pi to 24 digits via keyboard
(02-01-2015 11:34 AM)J-F Garnier Wrote:(02-01-2015 11:07 AM)Thomas Klemm Wrote: Could you provide a link where we could access them? Wait... the entire HP 71B ROM source code is available? Did I understand this correctly? Graph 3D | QPI | SolveSys |
|||
02-03-2015, 12:01 AM
Post: #26
|
|||
|
|||
RE: Approximate pi to 24 digits via keyboard
(02-02-2015 11:01 PM)Han Wrote: Wait... the entire HP 71B ROM source code is available? Did I understand this correctly? Yes. But it is nowhere near as hilarious as the HP-75C NOMAS source code listing: * "Hey Roo-man! Why do Vulcans have pointed ears?" * "I don't know, Joey. Why DO Vulcans have pointed ears?" * "So they can count to twelve!!!" Ceci n'est pas une signature. |
|||
02-03-2015, 12:33 AM
Post: #27
|
|||
|
|||
RE: Approximate pi to 24 digits via keyboard
(02-02-2015 11:01 PM)Han Wrote: Wait... the entire HP 71B ROM source code is available? Did I understand this correctly? The HP-71B is by far the most thoroughly documented calculator/computer HP (or maybe any Mfr) ever made. In addition to the full source listing, there are 2 other volumes dedicated to the s/w architecture and APIs, system buffers, storage formats etc. plus there are 3 more volumes for the h/w, 2 more volumes for HP-IL and another Volume for the Forth/Assembler ROM. After seeing all the interest and 3rd party activity with the 41, HP wanted to provide all the "tools" to take the 71B (originally the HP-44 internally) to the next level. As the story goes though, 71B sales remained disappointing after that large investment, and the team never produced such thorough docs for a product again. As you probably know, the 71 Forth ROM by BillW was the direct ancestor of RPL, and with the exception of Jim Donnelley's awesome "An Introduction to HP 48 System RPL and Assembly Language Programming" HP never really did extensive internals docs again. --Bob Prosperi |
|||
02-05-2015, 02:32 PM
(This post was last modified: 02-05-2015 02:43 PM by Dieter.)
Post: #28
|
|||
|
|||
RE: Approximate pi to 24 digits via keyboard
(02-02-2015 06:46 PM)Rick314 Wrote: Thank you Dieter. I found your table very interesting and quite a disappointment. It should be added to the HP-35S Bug List. Then let's start a 41C bug list, a 67/97 bug list, any many others. Loss of accuracy in the sine function (and probably others) for arguments close to pi is a common problem. Let's look at our good old trusted and beloved 41C: Code: x 41C sin(x) comment I assume the 67/97, the 34C, 25/29 and other well-reputed HPs will behave in a similar way. Dieter |
|||
02-05-2015, 10:59 PM
Post: #29
|
|||
|
|||
RE: Approximate pi to 24 digits via keyboard
(02-05-2015 02:32 PM)Dieter Wrote:(02-02-2015 06:46 PM)Rick314 Wrote: Thank you Dieter. I found your table very interesting and quite a disappointment. It should be added to the HP-35S Bug List. These are quite acceptable on the HP-34C, HP-41C/CV/CX, HP-10C, HP-11C, HP-15C and others, but NOT on the HP-33S (which replaced the HP-32S) and the HP-35S. Gerson. |
|||
02-06-2015, 11:16 AM
Post: #30
|
|||
|
|||
RE: Approximate pi to 24 digits via keyboard
Another way of seeing how many pi digits are used internally is to calculate the sine (in radians) of 10^10, 10^20, 10^30 etc and comparing with the true value, obtained with WolframAlpha:
Code:
41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE |
|||
02-06-2015, 03:03 PM
Post: #31
|
|||
|
|||
RE: Approximate pi to 24 digits via keyboard
(02-05-2015 02:32 PM)Dieter Wrote: Then let's start a 41C bug list, a 67/97 bug list, any many others. Loss of accuracy in the sine function (and probably others) for arguments close to pi is a common problem. Let's look at our good old trusted and beloved 41C: Just when I thought my trig routines for newRPL were good and stable... I just tried this using SIN of all digits of PI except the last one, and my code produces only 10 good digits (worst case, varies with the selected precision). So imagine you select a 500 digit precision and only get 10 good digits! What a joke, I need to work on that argument reduction. Granted, if you are close to pi with 499 digits matching, the value of those digits may have no practical meaning, but after reading this thread, I want newRPL to return the next 500 digits of pi Thanks to all the people who participate in discussions of this kind, now I'll be able to make sure this works properly. Claudio |
|||
02-06-2015, 04:10 PM
Post: #32
|
|||
|
|||
RE: Approximate pi to 24 digits via keyboard
(02-05-2015 02:32 PM)Dieter Wrote: Then let's start a 41C bug list, a 67/97 bug list, any many others. Loss of accuracy in the sine function (and probably others) for arguments close to pi is a common problem. Let's look at our good old trusted and beloved 41C: I verified HP-67/97 HP34C HP29C, they compute the same values as above. But HP-21 HP-25/HP-25C both produce the same even less accurate values, interestingly with more decimals. Obviously they use a different algorithm. Code:
Bernhard |
|||
02-06-2015, 06:34 PM
Post: #33
|
|||
|
|||
RE: Approximate pi to 24 digits via keyboard
(02-06-2015 04:10 PM)PANAMATIK Wrote: I verified HP-67/97 HP34C HP29C, they compute the same values as above. That's what could be expected for calculators of that era. (02-06-2015 04:10 PM)PANAMATIK Wrote: But HP-21 HP-25/HP-25C both produce the same even less accurate values, interestingly with more decimals. Obviously they use a different algorithm. The algorithms may even be similar, but the internal precision is not. Starting with the HP91, 67 and 97 in 1976 HP used 13 internal digits for most calculations to minimize roundoff errors. This was not yet available on earlier calculators like the 21 and 25 that appeared in 1975. This is what HP Journal 1976-11 says on page 17 ("The New Acccuracy: Making 23 = 8" by Dennis W. Harms): Quote:The second method of improving accuracy is to trap critical arguments and calculate the functions at these arguments in a special way. These critical arguments include numbers near 1 when calculating ln or log, numbers near 0 when calculating sin-1, cos-1, or tan-1, and numbers near zero or multiples of π/2 when calculating sin, cos, or tan. So indeed some algorithms have been updated in the "new accuracy calculators". Dieter |
|||
02-06-2015, 07:16 PM
(This post was last modified: 02-06-2015 08:21 PM by Marcus von Cube.)
Post: #34
|
|||
|
|||
RE: Approximate pi to 24 digits via keyboard
WP 34S is a bit paranoid about range reduction for trigs in radians. The interval value of (2*)PI carries 451 digits. It used to be even more but we reduced it for space reasons to the present precision.
Marcus von Cube Wehrheim, Germany http://www.mvcsys.de http://wp34s.sf.net http://mvcsys.de/doc/basic-compare.html |
|||
02-07-2015, 06:25 AM
(This post was last modified: 02-08-2015 01:26 PM by Werner.)
Post: #35
|
|||
|
|||
RE: Approximate pi to 24 digits via keyboard
@Marcus: yes, I noticed SIN(10^200) was still correct on the WP34S, and I gave up there ;-)
SIN(PI-10^-33) is only correct to 17 digits, however, not 34. 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE |
|||
02-07-2015, 11:15 PM
Post: #36
|
|||
|
|||
RE: Approximate pi to 24 digits via keyboard
(02-07-2015 06:25 AM)Werner Wrote: SIN(PI-10^-34) is only correct to 17 digits, however, not 34. That's something for Pauli to investigate. He the algorithm guru in our little project. Marcus von Cube Wehrheim, Germany http://www.mvcsys.de http://wp34s.sf.net http://mvcsys.de/doc/basic-compare.html |
|||
02-08-2015, 05:00 PM
Post: #37
|
|||
|
|||
RE: Approximate pi to 24 digits via keyboard
(02-07-2015 11:15 PM)Marcus von Cube Wrote: That's something for Pauli to investigate. He the algorithm guru in our little project. Of course it's pi – 10–33. ;-) But yes, the sine of this has just 17 exact digits. On the one hand that's fine since accuracy beyond SP (16 digits) is not guaranteed. On the other hand, if a simple fix is possible... Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 10 Guest(s)