Opened 11 years ago

Closed 11 years ago

#5560 closed Bugs (fixed)

cyl_bessel_j return NaN for low numbers

Reported by: agribov_no_s_p_a_m@… Owned by: John Maddock
Milestone: To Be Determined Component: math
Version: Boost 1.45.0 Severity: Problem
Keywords: Cc:

Description

Calculate cyl_bessel_j<double, double> for v = 10.0 and x = 1.0e-100. Return value is NaN instead of 0.0. Problem happens in file: \math\special_functions\detail\bessel_jn.hpp Line: 92. ratio become NaN.

Change History (4)

comment:1 by John Maddock, 11 years ago

Confirmed, investigating.

comment:2 by John Maddock, 11 years ago

Resolution: fixed
Status: newclosed

(In [72221]) Update Bessel functions to use series representations when x is small compared to v and also to prevent the generation of NaN's in such cases. Update docs to match. Fixes #5560.

comment:3 by John Maddock, 11 years ago

Resolution: fixed
Status: closedreopened

Reopened: there's still an issue for v < 0 and |v| >> x. Will be harder to fix though :-(

comment:4 by John Maddock, 11 years ago

Resolution: fixed
Status: reopenedclosed

(In [72415]) Add new series evaluation forms for the Bessel J and Y functions. Also take extra care when evaluating to avoid spurious overflow/underflow. Changed check_series_iterations to know the real-number type so messages are properly formatted. Updated docs to match and regenerated. Fixes #5560.

Note: See TracTickets for help on using tickets.