Simple approximation of Inverse Incomplete gamma function

醉酒当歌 提交于 2019-12-22 10:12:29

问题


How could one approximate Inverse Incomplete gamma function Г(s,x) by some simple analytical function f(s,Г)? That means write something like x = f(s,Г) = 12*log(123.45*Г) + Г + 123.4^s .

(I need at least ideas or references.)


回答1:


You can look at the code in Boost: http://www.boost.org/doc/libs/1_35_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma.html and see what they're using.

EDIT: They also have inverses: http://www.boost.org/doc/libs/1_35_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma_inv.html




回答2:


I've found out that x = f(s,Г) with given s can be nicely approximated by x = p0*(1-Г)^p1*ln(Г*p2). At least it worked for me with s <= 15 in region 0.001 < Г < 0.999.

Here p0,p1,p2 - is constants, which are chosen by approximation of f(s,Г) after you have chosen s.




回答3:


There's a pretty good implementation in Cephes. There's also a D translation that I think fixes a few bugs in the Cephes version.



来源:https://stackoverflow.com/questions/6707548/simple-approximation-of-inverse-incomplete-gamma-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!