#
# bessel.txt,  21 Mat 11

# As given in:
# J.F. Hart, Computer Approximations, New York, Willey 1968, p. 141
# and used in Numerical Recipes
# Also specified in Numerical recipes in C:1992

!fuzz 0.00000001

!msgpostfix Polynomial approximation for Bessel J0 function\n

!need all
 57568490574.0
-13362590354.0
   651619640.7
-   11214424.18
       77392.33017
-        184.9052456
 57568490411.0
  1029532985.0
     9494680.718
       59272.64853
         267.8532712
-          0.785398164

-0.1098628627e-2
 0.2734510407e-4
-0.2073370639e-5
 0.2093887211e-6

-0.1562499995e-1
 0.1430488765e-3
-0.6911147651e-5
 0.7621095161e-6
 0.934945152e-7

 0.636619772

# Also specified in Numerical recipes in C:1992
!msgpostfix Polynomial approximation for Bessel J1 function\n

!need all

 72362614232.0
- 7895059235.0
   242396853.1
-    2972611.439
       15704.48260
-         30.16036606

 144725228442.0
   2300535178.0
     18583304.74
        99447.43394
          376.9991397

 2.356194491

 0.183105e-2
-0.3516396496e-4
 0.2457520174e-5
-0.240337019e-6

 0.04687499995
-0.2002690873e-3
 0.8449199096e-5
-0.88228987e-6
 0.105787412e-6

 0.636619772


!msgpostfix Bessel function Y0 for positive x, Numerical recipes in C:1992\n

!need all
 8.0
- 2957821389.0
  7062834065.0
-  512359803.6
    10879881.29
-      86327.92757
         228.4622733
 40076544269.0
   745249964.8
     7189466.438
       47447.26470
         226.1030244
           0.636619772

-0.785398164
-0.1098628627e-2
 0.2734510407e-4
-0.2073370639e-5
 0.2093887211e-6
-0.1562499995e-1
 0.1430488765e-3
-0.6911147651e-5
 0.7621095161e-6
-0.934945152e-7
 0.636619772


!msgpostfix Bessel function Y1 for positive x, Numerical recipes in C:1992\n

!need all
 8.0
-0.4900604943e13
 0.1275274390e13
-0.5153438139e11
 0.7349264551e9
-0.4237922726e7
 0.8511937935e4
 0.2499580570e14
 0.4244419664e12
 0.3733650367e10
 0.2245904002e8
 0.1020426050e6
 0.3549632885e3
 0.636619772

 2.356194491
 0.183105e-2
-0.3516396496e-4
 0.2457520174e-5
-0.240337019e-6
 0.04687499995
-0.2002690873e-3
 0.8449199096e-5
-0.88228987e-6
 0.105787412e-6
 0.636619772


!msgpostfix modified Bessel function I0 for real x, Numerical recipes in C:1992\n

!need all
 3.75

 3.5156229
 3.0899424
 1.2067492
 0.2659732
 0.360768e-1
 0.45813e-2

 0.39894228
 0.1328592e-1
 0.225319e-2
-0.157565e-2
 0.916281e-2
-0.2057706e-1
 0.2635537e-1
-0.1647633e-1
 0.392377e-2

!msgpostfix modified Bessel function I0 for positive x, Numerical recipes in C:1992\n

!need all
 2.0
 4.0
-0.57721566
 0.42278420
 0.23069756
 0.3488590e-1
 0.262698e-2
 0.10750e-3
 0.74e-5

 1.25331414
-0.7832358e-1
 0.2189568e-1
-0.1062446e-1
 0.587872e-2
-0.251540e-2
 0.53208e-3


!msgpostfix modified Bessel function I1 for real x, Numerical recipes in C:1992\n

!need all
 3.75
 0.5
 0.87890594
 0.51498869
 0.15084934
 0.2658733e-1
 0.301532e-2
 0.32411e-3

 0.2282967e-1
-0.2895312e-1
 0.1787654e-1
-0.420059e-2
 0.39894228
-0.3988024e-1
-0.362018e-2
0.163801e-2
-0.1031555e-1


!msgpostfix modified Bessel function K1 for positive x, Numerical recipes in C:1992\n

!need all
 2.0
 4.0
 0.15443144
-0.67278579
-0.18156897
-0.1919402e-1
-0.110404e-2
-0.4686e-4

 1.25331414
 0.23498619
-0.3655620e-1
 0.1504268e-1
-0.780353e-2
 0.325614e-2
-0.68245e-3

# The Cephes Math Library tables are very long and not listed here..
# J0
# The domain is divided into two major intervals [0, 2] and
# (2, infinity). In the first interval the rational approximation
# is J0(x) = 1 - x^2 / 4 + x^4 R(x^2)
# The second interval is further partitioned into eight equal segments
# of 1/x.
#
# J0(x) = sqrt(2/(pi x)) (P0(x) cos(X) - Q0(x) sin(X)),
# X = x - pi/4,
#
# and the auxiliary functions are given by
#
# J0(x)cos(X) + Y0(x)sin(X) = sqrt( 2/(pi x)) P0(x),
# P0(x) = 1 + 1/x^2 R(1/x^2)
#
# Y0(x)cos(X) - J0(x)sin(X) = sqrt( 2/(pi x)) Q0(x),
# Q0(x) = 1/x (-.125 + 1/x^2 R(1/x^2))
#
# J1
# The domain is divided into two major intervals [0, 2] and
# (2, infinity). In the first interval the rational approximation is
# J1(x) = .5x + x x^2 R(x^2)
# 
# The second interval is further partitioned into eight equal segments
# of 1/x.
# J1(x) = sqrt(2/(pi x)) (P1(x) cos(X) - Q1(x) sin(X)),
# X = x - 3 pi / 4,
# 
# and the auxiliary functions are given by
# 
# J1(x)cos(X) + Y1(x)sin(X) = sqrt( 2/(pi x)) P1(x),
# P1(x) = 1 + 1/x^2 R(1/x^2)
# 
# Y1(x)cos(X) - J1(x)sin(X) = sqrt( 2/(pi x)) Q1(x),
# Q1(x) = 1/x (.375 + 1/x^2 R(1/x^2)).

!msgpostfix Evaluate Bessel function using Debye's asymptotic expansion (u2)\n

!need all
   81.0
- 462.0
  385.0
 1152.0

!msgpostfix Evaluate Bessel function using Debye's asymptotic expansion (u3)\n

!need all
  30375.0
-369603.0
 765765.0
-425425.0
 414720.0


!msgpostfix Evaluate Bessel function using Debye's asymptotic expansion (u4)\n

!need all
   4465125.0
- 94121676.0
 349922430.0
-446185740.0
 185910725.0
  39813120.0 

!msgpostfix Evaluate Bessel function using Debye's asymptotic expansion (u5)\n

!need all
   1519035525.0
- 49286948607.0
 284499769554.0
-614135872350.0
 566098157625.0
-188699385875.0
   6688604160.0

!msgpostfix Computer Bessel function of 1st and 2nd kind to 0th & 1st order, accuracy 10^-16\n

!need all
 0.7031250000000000e-01
 0.1121520996093750e+00
 0.5725014209747314e+00
 0.6074042001273483e+01
 0.1100171402692467e+03
 0.3038090510922384e+04
 0.1188384262567832e+06
 0.6252951493434797e+07
 0.4259392165047669e+09
 0.3646840080706556e+11
 0.3833534661393944e+13
 0.4854014686852901e+15

 0.7324218750000000e-01
 0.2271080017089844e+00
 0.1727727502584457e+01
 0.2438052969955606e+02
 0.5513358961220206e+03
 0.1825775547429318e+05
 0.8328593040162893e+06
 0.5006958953198893e+08
 0.3836255180230433e+10
 0.3649010818849833e+12
 0.4218971570284096e+14
 0.5827244631566907e+16

 0.1171875000000000e+00
 0.1441955566406250e+00
 0.6765925884246826e+00
 0.6883914268109947e+01
 0.1215978918765359e+03
 0.3302272294480852e+04
 0.1276412726461746e+06
 0.6656367718817688e+07
 0.4502786003050393e+09
 0.3833857520742790e+11
 0.4011838599133198e+13
 0.5060568503314727e+15

 0.1025390625000000e+00
 0.2775764465332031e+00
 0.1993531733751297e+01
 0.2724882731126854e+02
 0.6038440767050702e+03
 0.1971837591223663e+05
 0.8902978767070678e+06
 0.5310411010968522e+08
 0.4043620325107754e+10
 0.3827011346598605e+12
 0.4406481417852278e+14
 0.6065091351222699e+16

# Polynomial approximations to Bessel functions of order zero and one
# and to related functions.  AJM Hitchcock.
# Math. Tables Aids Comput. vol 11 pp 86-88, 1957

!msgpostfix Polynomial approximation, 0 <= x <= 4, for Bessel function of 1st kind and 0th order, error <= 10^-9 (Zhang & Jin)\n

!need all
-0.5014415e-3
 0.76771853e-2
-0.0709253492
 0.4443584263
-1.7777560599
 3.9999973021
-3.9999998721
# 1.0

!msgpostfix Polynomial approximation, 0 <= x <= 4, for Bessel function of 1st kind and 1st order, error <= 3.10^-10 (Zhang & Jin)\n

!need all
-0.1289769e-3
 0.22069155e-2
-0.0236616773
 0.1777582922
-0.8888839649
 2.6666660544
-3.9999999710
-1.9999999998

!msgpostfix Polynomial approximation, 0 <= x <= 4, for Bessel function of 2nd kind and 0th order, error <= 4.10^-10 (Zhang & Jin)\n

!need all
-0.567433e-4
 0.859977e-3
-0.94855882e-2
 0.0772975809
-0.4261737419
 1.4216421221
-2.3498519931
 1.0766115157
 0.3674669052

!msgpostfix Polynomial approximation, 0 <= x <= 4, for Bessel function of 2nd kind and 1st order, error <= 4.10^-10 (Zhang & Jin)\n

!need all
 0.6535773e-3
 0.0108175626
 0.107657606
 0.7268945577
 3.1261399273
 7.3980241381
 6.8529236342
 0.3932562018


!msgpostfix Polynomial approximation, 4 <= x <= infinity, for Bessel function of 1st & 2nd kind and 0th order, error <= 4.10^-9 (Zhang & Jin)\n

!need all
-0.9285e-5
 0.43506e-4
-0.122226e-3
 0.434725e-3
-0.4394275e-2
 0.999999997

 0.8099e-5
-0.35614e-4
 0.85844e-4
-0.218024e-3
 0.1144106e-2
-0.031249995


!msgpostfix Polynomial approximation, 4 <= x <= infinity, for Bessel function of 1st & 2nd kind and 1st order, error <= 6.10^-9 (Zhang & Jin)\n

!need all
 0.10632e-4
-0.50363e-4
 0.145575e-3
-0.559487e-3
 0.7323931e-2
# 1.000000004
-0.9173e-5
 0.40658e-4
-0.99941e-4
 0.266891e-3
-0.1601836e-2
 0.093749994

