[math-fun] Approximating the Gamma function via odd-symmetric series without use of log or exp
Here are the Chebyshev series for the two difference functions I discussed in the two half-width real x-intervals discussed. F := (x) -> 1/GAMMA(x + 1/2); G := (x) -> 1/GAMMA(x+1); q1 := (x) -> (F(x) - F(-x))/x; q2 := (x) -> (G(x) - G(-x))/x; q1(x) = a0 + a2*T2(4x) + a4*T4(4x) + a6*T6(4x) + ... Chebyshev coefficients of q1(x) for |x|<=1/4 (too many sig figs): n a[n] 0 2.18822857229909830468416902185791956060390956512732610220916600781336524039221351614053661977 2 -0.273254664514069887739896092160782999307994656871336958404374793160797168865425760349942762e-1 4 0.298843558421361874292283480521214547841448396931759631063620088816173984493887620815045728e-4 6 0.115114573208780641806719170236838336056759053167834329543704098768549342425490865814478718e-6 8 -0.24596221043229878207737975051549880236147396698687820663893052392755238157647809614502267e-9 10 0.700903301236630192987360690303673696995814846727736386728059810535958517989594944216083e-13 12 0.1261660315051917112681936532323335993717963292755059998170626330008128274587874270179e-15 14 -0.735303620333152064004118473781548822474805015615497130102796146688323107360418741e-19 16 -0.148580315319405091733312214886224961213524515441229540845127685713957418126987e-22 18 0.156722821422181051333643262566131246642066989884915231128910055564051822536e-25 20 -0.289556822227957635447323026158405881619161468803372482129382974179845e-31 22 -0.14583581654088669266132166903935664061380995038478086507246363893226e-32 24 0.919144989701256450086199852156777444804522833664634040713852193e-37 26 0.752668142932638434388006341797133201199276768708658410356828e-40 28 -0.6131920222632910048942474544299913417053885888724490223e-44 30 -0.24584298938594666516314771402732888658399133619611947e-47 32 0.196824757391719781666884661682625968030834861808e-51 34 0.551217673024981009660703211364678071294336715e-55 36 -0.37254557177220635202040279728156859712691e-59 38 -0.8900502016985072541654131882688630657e-63 40 0.441983214718463044434018665176878e-67 Chebyshev coefficients of q2(x) for |x|<=1/4 (too many sig figs): 0 1.15168363865576457705814530189465293229955060141593563368689524377854453753257249472725484500 2 -0.278835019474058038032956993831997136012779702403009023299260927859084781612456532789004573e-2 4 -0.40549257019888606583593775275055759936819477357423917507549633776139962493978575979661184e-4 6 0.1097384304887659151388140595412942905507915514982821715429963111267035066105692423482352986e-6 8 -0.52063341146368135636242068873450151617607660317907541879673101716830274615902745052075940e-10 10 -0.7421627199946726954059060253533201627802522519778046414777521440945128601179737263758490e-13 12 0.660267276982836929347795384431999632164757028142010788307875489843105082313448064188e-16 14 0.52942317528942885079120371250360945162626967557090543388947765597955864045772849e-20 16 -0.167554813606803522917419567307197359356327764959597352006173936168385154713923e-22 18 0.17633333649446838102944788403535051137759024643942454988967735664720308007e-26 20 0.176314055714521646530599912070028050509839133705044662115599052049549708e-29 22 -0.29231757438826628324200236073984754079659038161272527028043683314940e-33 24 -0.9956920708938751225814610094553410549308448163967976079073297640e-37 26 0.187916818188481602140697618536266190071442938779569508334821e-40 28 0.352535312621740588265806815750559184380716955178170093798e-44 30 -0.66654916712880469315737878543401886078998130564459950e-48 32 -0.869604314728724930195939309153741276286429652258e-52 34 0.147695558683492868605235261902054118647388149e-55 36 0.159139215387692683697334870224606153295582e-59 38 -0.2174748996700316207119288633926217464e-63 40 -0.221510015046556441186755906516959e-67 As you can see, the speed of convergence is pretty spectacular; 12 terms in each series will give you error<10^(-37). Were Gosper to Rational-Remez these it should become slightly better still. In MAPLE, you allegedly can get it to find rational Remez best approximation of degree 7/degree 5 by with(numapprox); wght := (x) -> 1; minimax(q1, -1/4 - 10^(-87)..1/4 + 15.4632*10^(-88), [7, 5], wght, 'maxerror' ); #notice I have used a slight random enlargement of the #interval -1/4, 1/4 to prevent MAPLE #from activating some bullshit... but then it just gives different kind of failure but in fact, I have never managed to make MAPLE actually succeed after several tries, gave up. MAPLE has a lot of bugs.
participants (1)
-
Warren Smith