Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Aug 2012 10:58:21 -0500
From:      Stephen Montgomery-Smith <stephen@missouri.edu>
To:        Bruce Evans <brde@optusnet.com.au>, freebsd-numerics@FreeBSD.org
Subject:   Re: Complex arg-trig functions
Message-ID:  <502BC71D.4080401@missouri.edu>
In-Reply-To: <20120816010912.Q1751@besplex.bde.org>
References:  <5017111E.6060003@missouri.edu> <501C361D.4010807@missouri.edu> <20120804165555.X1231@besplex.bde.org> <501D51D7.1020101@missouri.edu> <20120805030609.R3101@besplex.bde.org> <501D9C36.2040207@missouri.edu> <20120805175106.X3574@besplex.bde.org> <501EC015.3000808@missouri.edu> <20120805191954.GA50379@troutmask.apl.washington.edu> <20120807205725.GA10572@server.rulingia.com> <20120809025220.N4114@besplex.bde.org> <5027F07E.9060409@missouri.edu> <20120814003614.H3692@besplex.bde.org> <50295887.2010608@missouri.edu> <20120814055931.Q4897@besplex.bde.org> <50297468.20902@missouri.edu> <20120814173931.V934@besplex.bde.org> <502A820C.6060804@missouri.edu> <20120816010912.Q1751@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 08/15/12 10:19, Bruce Evans wrote:

> Though sin() doesn't lose precision at large or not so large zeros, Bessel
> functions probably do.  I think no one knows where many of their zeros
> near DBL_MAX are, since they are not evenly spaced like multiples of pi
> are, so every one needs an individual calculation.  pari become incredibly
> slow at just finding them after the first few hundred, at least using the
> following perhaps too simple script:
>
>        for (i = 0, 999, print(solve(x=i*Pi, (i+1)*Pi, besselj(0,x))))



>
> This gets slower and slower as i increases and takes about 1 second
> per zero starting at i = 900.  But after pari takes a few minutes to
> generate 1000 zeros, FreeBSD libm j0 and j0f pass checks of them all
> in 1.5 msec.  The check is that there is a sign change on each side
> of the supposed zero.  So FreeBSD j0 and j0f get at least 1 bit right
> (the sign bit) for the first 1000 zeros.

There are asymptotic formulas for the Bessel Functions for large x.  So 
surely one could get very accurate formulas for the large roots.  My 
guess is that to machine precision, the roots are evenly spaced (pi 
apart) for roots larger than 1/EPSILON (since I am guessing that the 
error in the asymptotics is about 1/x^(3/2)).

http://en.wikipedia.org/wiki/Bessel_function#Asymptotic_forms

Mathematica finds the roots very fast:

N[BesselJZero[1/10, 10000], 50]

31415.141141713507985336657384821650558701674510788

I did it for the Bessel function of order 1/10, just to make sure that 
it wasn't storing huge tables.


I know Mathematica is produced by an evil corporation, but I am 
constantly impressed by how well it performs.

Hey - I just performed this experiment:

Table[N[BesselJZero[0/10, n] - BesselJZero[0/10, n - 1], 50], {n,
   100000, 100100}]

The asymptotics are much better than I supposed, since these are Pi to 
about 18 decimal digits.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?502BC71D.4080401>