Ticket #5175 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

pari error is thrown when computing Bessel function J0(0)

Reported by: pdenapo Owned by: was
Priority: major Milestone: sage-4.1.1
Component: interfaces Keywords:
Cc: Work issues:
Report Upstream: Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

Description (last modified by mabshoff) (diff)

A bug under sage 3.2.3 computing J_0(0) (which should be just "1")

sage: g=Bessel(0)
sage: g          
J_{0}            
sage: g(1)
0.765197686557967
sage: g(0)      
---------------------------------------------------------------------------
PariError                                 Traceback (most recent call last)

/home/pablo/sage/sage-3.1/<ipython console> in <module>()

/home/pablo/sage/sage-3.1/local/lib/python2.5/site-packages/sage/functions/special.pyc in __call__(self, z)
    689             return bessel_I(nu,z,algorithm=s,prec=p)
    690         if t == "J":
--> 691             return bessel_J(nu,z,algorithm=s,prec=p)
    692         if t == "K":
    693             return bessel_K(nu,z,algorithm=s,prec=p)

/home/pablo/sage/sage-3.1/local/lib/python2.5/site-packages/sage/functions/special.pyc in bessel_J(nu, z, algorithm, prec)
    522             K = C
    523         K = z.parent()
--> 524         return K(pari(nu).besselj(z, precision=prec))
    525     elif algorithm=="scipy":
    526         if prec != 53:

/home/pablo/sage/sage-3.1/local/lib/python2.5/site-packages/sage/libs/pari/gen.so in sage.libs.pari.gen._pari_trap (sage/libs/pari/gen.c:38645)()

PariError:  (8)
}}}}

Change History

comment:1 Changed 4 years ago by mabshoff

  • Summary changed from [bug] Bug computing Bessel function J0(0) to pari error is thrown when computing Bessel function J0(0)
  • Description modified (diff)
  • Milestone set to sage-3.4.1

comment:2 Changed 4 years ago by AlexGhitza

  • Owner changed from tbd to was
  • Component changed from algebra to interfaces
  • Summary changed from pari error is thrown when computing Bessel function J0(0) to [already fixed] pari error is thrown when computing Bessel function J0(0)

This works in sage-4.1:

----------------------------------------------------------------------
| Sage Version 4.1, Release Date: 2009-07-09                         |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: g = Bessel(0)
sage: g(0)
1.00000000000000

comment:3 Changed 4 years ago by mvngu

  • Status changed from new to closed
  • Resolution set to fixed
  • Summary changed from [already fixed] pari error is thrown when computing Bessel function J0(0) to pari error is thrown when computing Bessel function J0(0)
Note: See TracTickets for help on using tickets.