The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Riemann's Zeta Function - another approach (RPL)
06-17-2017, 01:37 AM (This post was last modified: 06-17-2017 01:41 AM by Gerson W. Barbosa.)
Post: #1
Riemann's Zeta Function - another approach (RPL)
Code:

%%HP: T(3)A(D)F(.);
\<< DUP DUP TYPE { C\->R MIN } IFT -1.3 ^ 178. * 1. + 2. / IP DUP + \-> s n
  \<< '\GS(k=0.,n-1.,(-1.)^k/(k+1.)^s)' EVAL n .5 + s 1. + 8. n * / + s DUP + 1. + 27. n SQ * / - s ^ DUP + INV + 2. s ^ DUP 2. - / *
  \>>
\>>

0.5 -> -1.46035450880 (8.37 s)
1.0001 -> 10000.5772771 (3.53 s)
1.27 -> 4.30022020082 (2.64 s)
1.5 -> 2.61237534865 (2.18 s)
2 -> 1.64493406683 (1.54 s)
3 -> 1.20205690315 (1.00 s)
4 -> 1.08232323371 (0.78 s)
5 -> 1.03692775514 (0.64 s)
6 -> 1.01734306198 (0.57 s)
7 -> 1.00834927738 (0.49 s)
19.99 -> 1.0000009606 (0.31 s)
(2,3) -> (0.798021985125,-0.113744308033) (4.89 s)


(Tested on the HP 50g only).

This is based on an alternate series and two correction terms, the latter of which I am not so sure of. If a third correction term is found, both speed and accuracy for arguments close to 1 can be improved. The formula can be extracted from the listing, but I may included it later. (This is an afternoon's work and is still very immature - my original intention is a solution that would work on the HP-42S).

For a more complete and faster solution, with extended range, please refer to Riemann's Zeta Function update (HP-28S, HP-48G/GX/G+, HP-49G/G+/50g) (complex arguments will return accurate results only on a narrow strip, though).

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


Messages In This Thread
Riemann's Zeta Function - another approach (RPL) - Gerson W. Barbosa - 06-17-2017 01:37 AM



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