Hello,

> However, I seem to be having trouble with the incomplete gamma function. 
> > Here are two difficulties. First, in trying to evaluate the incomplete 
> > gamma function at a point where the result should be very small, I just 
> get 
> > zero even if I increase the precision arbitrarily. In particular 
> consider 
> > 
> > numerical_approx(gamma(9, 10^(-3))-gamma(9), digits=40) 
> > 
> > the value of this number is approximate -1.1 \times 10^(-28), but I just 
> > get 0.00000 ...0 for the input above. 
>
> I think this is a bug in the Sage's interface to PARI's incomplete 
> gamma-function implementation. 
> The latter has a parameter 'precision' that actually allows you do 
> increase the precision of the computation here as much as you like.
>
 
>From looking at the source code, I suspect that the problem is in 
sage.functions.other.Function_gamma_inc, where the method _evalf_() does 
not use its argument "parent" (and hence does not know about the precision 
of that parent).

If you don't want to use PARI explicitly, you can also avoid the bug by 
typing

sage: C = ComplexField(400)
sage: C(9).gamma_inc(1/1000) - gamma(9)
-1.11011156551770881154239109830530085698810642670976295680548580836149189576782725366794514487711609262987622059881687164e-28

Peter

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to