On Wed, 17 Feb 2010 at 10:25PM -0800, eliot brenner wrote: > I have a program that includes the command to evaluate the K-Bessel > function using Pari: it will sometimes be called with arguments like > the following: > > bessel_K(5*i,320,"pari",100) > > which evaluates the Bessel function at index (first variable) 5i, > value (second variable) 320, with 100 precision. > > This exhibits some unexpected behavior when called from within SAGE, > as follows. The bessel_K fucntion, with fixed index, and growing > second variable exhibits exhibits exponential decay, as shown by these > (correct) calculations performed in Pari itself: > [...] > ? besselk(5*I,200) > > %25 = 1.1515969255360280546036312473791321981 E-88 + > 1.7485172637427202649 E-133*I [...] > sage: bessel_K(5*i,200,"pari",100) > > -4.3246147682420463563103557554e40 + > 4.3246147682420463567825924037e40*I > > So they agree until the second variable reaches at least 50, but then > SAGE starts reporting wrong answers.
Yikes. That's awful. There are some other ways in which that function is broken; see http://trac.sagemath.org/sage_trac/ticket/3426. I'll mention these problems on that ticket, so that when we fix it, we put in some doctests to make sure this doesn't happen again. Dan -- --- Dan Drake ----- http://mathsci.kaist.ac.kr/~drake -------
signature.asc
Description: Digital signature