Fredrik: Thank you for your thoughtful reply! On Thu, Jan 21, 2016 at 2:48 PM Fredrik Johansson < fredrik.johans...@gmail.com> wrote:
> Arb (which is now in Sage) permits computing incomplete gamma > functions with rigorous error bounds over arbitrary-precision > real/complex (interval) fields. I don't find the incomplete function. Am I looking in the wrong section? http://fredrikj.net/arb/acb.html?highlight=gamma#gamma-function > Supporting the different regularized > versions is just a matter of dividing by a complete gamma function. > My understanding is that computing the regularized function directly gives less error than division of two huge numbers, but I don't truly understand the theory of numeric error. > Looking at the attachment, I don't know if the logarithmic versions of > incomplete gamma functions are really useful. Why would gamma_log(a, x) be less useful than gamma_log(a)? Certainly the incomplete functions increase to astronomical quantities similarly to the complete function. Anyway, that doesn't seem to be an argument to make it unavailable. However I do hear the point that I shouldn't worry about this edge case at all. > The regularized > incomplete gamma functions P and Q are quite standard and used in > statistics, I think. > That's a useful note. That's what I'm seeing in my research as well. > Personally, I think the usual gamma() function is too important in its > own right to complicate by adding extra options. I would rather leave > gamma() a single-argument function and have separate functions for > logarithmic and incomplete gamma functions of various kinds. Options and number of arguments are separate issues, in my mind. The one extreme would be gamma(a) while the other would be gamma(a, x1=0, x2=oo, log=False, regularized=False). I believe you and Nils agree that the 'log' and 'regularized' options are sketchy. I think I agree too. However the three-argument gamma (the generalized gamma) is a useful normal form for the upper and lower incomplete functions. > In mpmath, there is a single function gammainc() that covers all cases of > incomplete gamma functions. But it's not necessary to do it in that > particular way. > mpmath.gammainc() with one argument calculates the complete gamma, which makes it feel miss-named and redundant to me. If you want symbolic manipulation to be aware of different variants, you probably need to do something in Pynac/SymPy/Maxima rather than > Sage itself. > All three, or just one? If one, is it my decision, or predetermined by details of sage? -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.