New Sum of Powers Log Function
|
04-01-2021, 11:05 PM
Post: #19
|
|||
|
|||
RE: New Sum of Powers Log Function
(04-01-2021 06:05 PM)Namir Wrote: Does any of your previous analysis and approximations work on the following variants of the SopLog summations? It depends on the function, and its argument. Euler–Maclaurin might not work. Example, on your sdSum (I think you meant range(n,1,-1), or range(2,n+1) in reverse) Code: exact = lambda x,n,scale: 1 + fsum(k**(x*scale**(n-k)) for k in xrange(2,n+1)) >>> x, n, scale = 0.5, 100000, 0.5 >>> exact(x,n,scale), guess(x,n,scale) (100337.09650943844, 100318.790872778) Try a big x, guess is so wrong, it "sumed" negative ! >>> x = 1.5 >>> exact(x,n,scale), guess(x,n,scale) (31728482.871558648, -38398120.2216635) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)