Post Reply 
Approximate pi to 24 digits via keyboard
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:

Code:
 x             41C sin(x)       comment
---------------------------------------------------
3,1           4,158066243 E-2   exact
3,14          1,592652917 E-3   almost exact
3,141         5,926533553 E-4   1 digit off
3,1415        9,265358987 E-5   2 digits off
3,14159       2,65359 E-6       3(4) digits lost *)
3,141592      6,5359 E-7        4(5) digits lost *)
3,1415926     5,359 E-8         5(6) digits lost *)
3,14159265    3,59 E-9          6(7) digits lost *)
3,141592653   5,9 E-10          7(8) digits lost *)
---------------------------------------------------
                                *) last digit is 0

I assume the 67/97, the 34C, 25/29 and other well-reputed HPs will behave in a similar way.

Dieter

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 Wink
Thanks to all the people who participate in discussions of this kind, now I'll be able to make sure this works properly.

Claudio
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Approximate pi to 24 digits via keyboard - Claudio L. - 02-06-2015 03:03 PM



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