On Thu, Sep 25, 2014 at 9:51 PM, kcrisman <[email protected]> wrote: >> >> For Sage, fixing the problem is actually trivial: when the >> >> hypergeometric >> >> function is a polynomial (and at least when the inputs are exact), >> >> don't >> >> call mpmath; just evaluate the polynomial directly and then call .n() >> >> on the >> >> result. >> >> >> > >> > Except then Sage would have to know when it is a polynomial, and >> > probably we >> > would need to ask Maxima for that (assuming it knows). So maybe not >> > completely trivial to make sure it works. >> >> It's a polynomial when any of the first parameters is a nonpositive >> integer. >> > > Is that "if and only if"? That would certainly be convenient.
Yes, that follows immediately from the definition. I should clarify that the hypergeometric function can be zero for rational input even if it is not a polynomial in z. For example 1F1(3/2, 1/2, z) = (1 + 2*z) * exp(z) (you can verify that mpmath does not converge with z = -0.5). You are less likely to run into such zeros, though. Fredrik -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
