public inbox for
 help / color / mirror / Atom feed
* Why compute value for nmax+1 in bessel_Jn_array()?
@ 2015-06-05  7:30 Ruslan Kabatsayev
  0 siblings, 0 replies; only message in thread
From: Ruslan Kabatsayev @ 2015-06-05  7:30 UTC (permalink / raw)
  To: gsl-discuss


I'm looking into implementation of gsl_sf_bessel_Jn_array(). There
stat_np1 is computed for nmax+1 and stat_n for nmax, so that later the
backward recurrence relation is used to obtain values for nmin through
nmax-1. It seems strange to me though that nmax+1 is used at all —
can't the function just go down from nmax and nmax-1 instead of nmax+1
and nmax? It seems currently it does one extra computation only to
effectively throw away its result. This also becomes a problem e.g.
when x==0.7 and nmax==141: the underflow error makes it fail, although
if the function started from nmax instead of nmax+1, it'd succeed as
it currently does for nmax==140.

Could someone clarify this to me?


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-06-05  7:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-05  7:30 Why compute value for nmax+1 in bessel_Jn_array()? Ruslan Kabatsayev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).