Riemann's Zeta Function - another approach (RPL)
|
08-04-2017, 03:37 PM
Post: #77
|
|||
|
|||
RE: Riemann's Zeta Function - another approach (RPL)
(08-02-2017 11:19 AM)Dieter Wrote:(08-01-2017 04:54 PM)Gerson W. Barbosa Wrote: I remember I had to hard-code Zeta(0) = -1/2 here (line 116). It appears the problem has been fixed on the WP34S. Without your testings, probably it would remain unnoticed for a long time. Back to the HP-41: Code:
Code:
ZETA, from line 29 on, is essentially your code. GAMMA uses a 10th degree polynomial approximation for the interval [1..2] and simple multiplications for x > 2, but a higher order polynomial might be necessary for 10-digit accuracy. Anyway, it can be replaced with better GAMMA implementations. Still, the ideal 30-second limit is surpassed only for large negative arguments, close to the end of the valid range: 3 XEQ ZETA --> 1.202056903 (15.6 s) 2.001 R/S --> 1.643997513 (2) (17.0 s) 2 R/S --> 1.644934067 ( 4.5 s) 1.5 R/S --> 2.612375349 ( 4.5 s) 0.5 R/S --> -1.460354509 ( 5.1 s) 0 R/S --> -0.500000000 ( 4.6 s) -0.5 R/S --> -0.2078862450 (250) (12.8 s) -1 R/S --> -0.08333333384 (33) (11.6 s) -1.001 R/S --> -0.08316803696 (723) (24.3 s) -1.5 R/S --> -0.02548520436 (190) (24.0 s) -2 R/S --> 0.00000000000 (23.6 s) -3 R/S --> 0.008333333384 (33) (20.7 s) -5 R/S --> -0.003968253990 (68) (19.3 s) -7 R/S --> 0.004166666686 (67) (18.4 s) -15.16 R/S --> 0.4964873534 (85) (18.5 s) -33.34 R/S --> -1.924684098E10 (152) (21.9 s) -41.42 R/S --> -3.506595602E16 (584) (24.1 s) -48.49 R/S --> -3.653091058E22 (22) (26.2 s) -58.59 R/S --> 1.136304829E32 (792) (29.0 s) -67.97 R/S --> 1.832460467E40 (1182) (31.4 s) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)