[Scipy-tickets] [SciPy] #659: hyperg is wrong for large negative x

SciPy scipy-tickets@scipy....
Tue Apr 29 04:24:57 CDT 2008

#659: hyperg is wrong for large negative x
 Reporter:  helias         |       Owner:  somebody
     Type:  defect         |      Status:  new     
 Priority:  normal         |   Milestone:  0.7     
Component:  scipy.special  |     Version:  devel   
 Severity:  normal         |    Keywords:          
 === problem ===
 The evaluation of hyperg (hyp1f1, real arguments) yields wrong results for
 large negative x=-30.
 The problem appeared with changeset 3012, where Kahan's summation formula
 was applied. The problem seems to be a too optimistic error estimate in
 Kahan's summation: The error estimation of hy1f1p
 (special/cehpes/hyperg.c) is always in the range of machine resolution,
 but the actual error is much larger due to cancelation in the strongly
 alternating series (for negative x). Hence, hyperg always returns the
 result of hy1f1p, even, if hy1f1a would be better (as for large negative
 Restoring the old error estimation based on the maximum term yields a too
 high error estimates.

 === possible solution ===
 Resorting to the fortran function chgm in specfun/specfun.f also works for
 negative x=-30.

Ticket URL: <http://scipy.org/scipy/scipy/ticket/659>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.

More information about the Scipy-tickets mailing list