(HP15C)(HP67)(HP41C) Bernoulli Polynomials
|
09-03-2023, 01:20 AM
(This post was last modified: 09-11-2023 09:05 PM by Albert Chan.)
Post: #20
|
|||
|
|||
RE: (HP15C)(HP67)(HP41C) Bernoulli Polynomials
The reason we sidetrack for Bernoulli numbers is we wanted to use this:
With previous post for bernoulli numbers (O(1), speed and storage), we have: Code: function b0(m) Code: function b(m, x) lua> b(3, 5.5) 123.75 lua> b(5, 3.5) 220.9375 lua> b(15, pi) 640433.1973240786 lua> b(16, pi) 1462871.9320025162 Update 1: halved d, and use floor instead of round b0(m) = (n+0.5)/d = (2n+1)/(2d) = odd/even, as expected Update 2: zeta = (1+3^-m)/(1-2^-m) estimate is better than (1+2^-m+3^-m) We could implement this without cost (actually, cheaper!) Also, I remove complex number math for sign of b0(m) Update 3: return bad b0(m) too, before zeta correction. Ratio is zeta(m) lua> good, bad = b0(2) lua> good, bad, good/bad -- = zeta(2) 0.16666666666666666 0.10132118364233778 1.6449340668482262 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)