Digamma Function for the free42
|
04-23-2022, 02:21 AM
Post: #2
|
|||
|
|||
RE: Digamma Function for the free42
(08-28-2020 09:26 PM)Albert Chan Wrote: \(\qquad\qquad\exp( \psi(x+1/2)) = x "Last" constant may be adjusted to fit better. 74381/689976 * 3.7 ≈ .3989 >>> from mpmath import * >>> mp.dps = 34 >>> def psi0(x): x-=mpf(.5); return log(x + 1/(24*x + 37/(10*x+3986/(1000*x)))) ... >>> for x in range(31, 40): print '%d\t%+g' % (x, psi(0,x) - psi0(x)) ... 31 -5.06859e-16 32 -2.81682e-16 33 -1.30994e-16 34 -3.12469e-17 35 +3.35827e-17 36 +7.44676e-17 37 +9.89633e-17 38 +1.12294e-16 39 +1.18083e-16 Sweet spot is to get ψ(x+33), then adjust back down, ψ(x) = ψ(x+1) - 1/x Code: 00 { 58-Byte Prgm } For euler_gamma constant, it matched 16 digits 1 XEQ "Psi" +/- → 0.5772156649015328293596189489309783 |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Digamma Function for the free42 - Juan14 - 04-22-2022, 02:20 PM
RE: Digamma Function for the free42 - Albert Chan - 04-23-2022 02:21 AM
RE: Digamma Function for the free42 - Juan14 - 04-23-2022, 05:06 PM
RE: Digamma Function for the free42 - Albert Chan - 04-23-2022, 05:56 PM
RE: Digamma Function for the free42 - Thomas Okken - 04-23-2022, 06:07 PM
RE: Digamma Function for the free42 - Juan14 - 04-24-2022, 04:46 PM
|
User(s) browsing this thread: 1 Guest(s)