octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #48307] sinc loses precision for large argumen


From: Colin Macdonald
Subject: [Octave-bug-tracker] [bug #48307] sinc loses precision for large arguments
Date: Tue, 5 Jul 2016 07:27:35 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0

Follow-up Comment #28, bug #48307 (project octave):

I looked more carefully at bessel functions: my example in #48316 is a bit
flawed: it only uses integer inputs.  The relative error is much larger for
nearby non-integer inputs.  Maybe my expectations really are out-of-line with
common practice here!  I apologize for the tone of my debate.

My reading about other tools:

[Zhang and Jin 1996] (Standard special function reference).  For jn(x), they
simply compute sin(x)/x in double precision for j0(x).  SciPy then uses this
algorithm via the fortran code "specfun".  For this reason, scipy's j0(pi*x)
agrees with Octave's sinc(z).

NR: for jn(x), they call their regular besselj function and scale with
sqrt(1/x)---the formula I mentioned below.

Matlab: seems to use sin(x)/x (b/c results match Octave's)

Boost: uses sin(x)/x for j0 and otherwise uses besselj.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48307>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]