Skip to content

Commit 972ad32

Browse files
Document pbdv recurrence condition
1 parent d12d59f commit 972ad32

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

include/xsf/par_cyl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,7 @@ void pbdv(T v, T x, T &pdf, T &pdd) {
638638
detail::pbdv(x, v, dv, dp, &pdf, &pdd);
639639
T nearest = nearbyint(v);
640640
T distance = fabs(v - nearest);
641+
// The forward recurrence is unstable within a few ulps of positive integer orders.
641642
if ((x < -5.8) && (v > 0.0) && (distance > 0.0) &&
642643
(distance <= 8.0 * std::numeric_limits<T>::epsilon() * fabs(v))) {
643644
T pvf, pvd;

0 commit comments

Comments
 (0)