Evaluation of ζ(2) by the definition (sort of) [HP42S & HP71B]

11032021, 12:38 AM
Post: #18




RE: Evaluation of ζ(2) by the definition (sort of) [HP42S & HP71B]
(10312021 03:40 PM)Albert Chan Wrote: Another approach, getting ζ(2) with alternating series. I translated the code to Decimal Basic, to check its convergence rate. Amazingly, it is almost the same as original! 2.0899 digit per iteration However, accuracy is less by 0.4180 digit, compared with non alternating sum. Cost per loop is a lot smaller though. Code: OPTION ARITHMETIC DECIMAL_HIGH Note: I did not add the b initial correction, for fair comparison. n = 100 Accurate digits = 210.27025201561072 n = 101 Accurate digits = 212.36014715889508 n = 102 Accurate digits = 214.45004193935936 n = 400 Accurate digits = 837.2346060430264 n = 401 Accurate digits = 839.32448364856168 n = 402 Accurate digits = 841.41436124813102 For n=478, it almost reached 1000 digits full precision (1 ULP error, last digit = 8 instead of 9) 

« Next Oldest  Next Newest »

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