(DM42) (Free42) Riemann Zeta function for complex variables - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (DM42) (Free42) Riemann Zeta function for complex variables (/thread-19794.html) |
(DM42) (Free42) Riemann Zeta function for complex variables - Gjermund Skailand - 04-10-2023 04:17 PM minor update Riemann Zeta function for DM42, Free42 Real or complex input, accuracy 30-32 digits Zeta(s)=Zeta(x+iy) Uses reflection formula for input with real part less than 1 Note that Zeta(1) is not defined.(or infinity if you like) Uses "Borwein method(2)" Runs in 4stk mode, using local vaiables N,d,r,s, requires function "Gamma" included in raw file. for real values: Accuracy of 30-32 digits. for imaginary values y: The method is slow, since required iterations incerases with about 0.9*Y. Might not be that important if using Free42... If you do not require full accuracy, at line 16, change from 44 to 16 will give 11-12 correct digits some exact values as examples for calibration Zeta(2)= (pi^2)/6 Zeta(10)=(pi^10)/93555 Zeta(-13)= -1/12 No exact values for complex input, but compare accuracy to wolframalpha: Zeta(2.5+i3.3), in 0.28 seconds on DM42 on USB power --> 0.8517959540094586535483446233861111 -i0.06816865625500691866043404518227872 For complex values, use e.g. http://www.wolframalpha.com Zeta function Zeta(2.5 +i3.3) = 0.8517959540094586535483446233861100 -0.06816865625500691866043404518227873 i Zeta(2.5+i3.3), reduced accuracy in 0.10 seconds on DM42 on USB power --> 0.85179595401 -i0.06816865626 (fix 11) 2023-04-10 skai new version Code:
Gjermund |