逆不完全伽玛函数的简单近似
如何通过一些简单的分析函数 f( s,Г)? 这意味着编写类似 x = f(s,Г) = 12*log(123.45*Г) + Г + 123.4^s 的内容。
(我至少需要想法或参考。)
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.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你可以看看Boost中的代码:http://www.boost.org/doc/libs/1_35_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma.html并看看他们在使用什么。
编辑:它们也有逆:http://www.boost.org/doc/libs/1_35_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/sf_gamma/igamma_inv.html
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
我发现给定 s 的 x = f(s,Г) 可以很好地近似为 x = p0*(1-Г)^p1*ln(Г*p2)。至少它对我有用,在 0.001 < 区域中 s <= 15 Г< 0.999。
这里 p0,p1,p2 - 是常数,在选择 s 后通过 f(s,Г) 的近似值来选择。
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.
Cephes 中有一个非常好的实现。还有一个 D 翻译我认为修复了 Cephes 版本中的一些错误。
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.