jresv77Bn3-4p111

Embed Size (px)

Citation preview

  • 7/26/2019 jresv77Bn3-4p111

    1/4

    JOURN

    AL

    O F

    RESE

    ARCH of the Nat io nal Bureau of Standards - B. M a thema tica l Sciences

    Vo

    l

    77B, N

    os

    . 3&4, Jul

    y-De

    cember 1973

    and

    J

    of

    Complex

    rgument

    and

    Integer O rder

    David

    J. Sookne*

    Institute for Basic

    Standards,

    National Bureau of Standards, Washington, D.C.

    20234

    (June

    4, 1973)

    A com

    pu

    ter prugram is d

    esc

    ribe d for c a lcula t i ng Bes sel func tion s J (z) a nd / (z) . fur z co

    mpl

    ex,

    and

    n

    a nonn

    eg

    ative

    in teg e r.

    Th e method use d is th at of ba ck

    wa

    rd recursion, w

    ith

    strict c

    ontrol f

    e

    rror

    ,

    and op

    ti

    mum de te rmina tio n of the point at whic h to begin the r

    ec

    ur sion.

    Key

    wo

    rds : B

    esse

    l func t

    io

    ns; bac kward rec

    ur

    s iun; error bo

    und

    s; Miller alg

    orith

    m;

    diff

    eren

    ce

    e

    qu

    ation.

    1.

    Method

    G

    iv

    en a complex number z and a positive integer

    NB,

    BESLe I calculat

    es

    either

    III(z),

    n= O, l ,

    . , NB-1

    jll (Z) n= O,

    1,

    NB - 1

    ng d ouble

    -p

    r

    ec

    ision arit hme

    ti

    c. Th e method u

    se

    d is described in [lJ 1 a nd is base d on al

    go rithm

    s

    and

    Miller [3], applied to the differen

    ce

    equation

    2n

    Y

    - I

    YII-SIGN ' Y +I,

    z

    SI GN is + l forj s , - l for I s .

    (

    1

    Th e

    pr

    ogram

    se

    ts MAGZ = [Izl]' the integer

    part

    of z l, PM AGZ=

    O ,

    PM

    AGZ +

    1= 1,

    and

    then

    ively calculates

    PII+I= SIGN 2znpn-PII

    _

    I) ,

    n=MAGZ 1 ,

    MAGZ+2, .

    (2)

    e sequence is strictly in creasing in magnitude

    [l

    sec . 6].

    Th

    e program takes

    N

    to be the least

    such that

    lI

    l

    exceeds a number TEST defined in sec tion 2 and section 3. I t then

    se

    ts

    )=O, y

  • 7/26/2019 jresv77Bn3-4p111

    2/4

    where

    j s ,

    1m z> 0

    [N I

    ]

    J t

    = fON) +

    2

    2:

    J s , lmz=O

    n l

    J.t=e-

    Z

    f

    O

    N

    )

    +2

    Sf V

    )

    1/

    .= 1

    J s,

    1m

    z

    0

    r

    I z]

    J t

    = f / ) + 2 2: - 1 ) I

    I s ,Rez=O

    n =

    I s,

    Re

    z

    MAGZ,

    the

    trun

    ca

    tion

    error in y ~ : V

    is

    see

    [2J; equations 5.01 and 5.02.

    This erro

    r is bounded by

    using

    the followin g

    LEMMA:

    For n > MAGZ, let

    k

    - Pn+' _

    2n

    Pn - '

    -

    - - - -

    Pn

    z Pn

    and

    let

    n + 1 n

    1

    2

    ff;

    -

    =-Izl+ zl )-1.

    Let

    Pn

    =

    min I k

    n

    , An)

    Th e

    n/or m ? n,

    I

    k

    m

    >

    Pn

    The

    lemma , for re al z is lemma 2

    of

    [IJ.

    The

    proof for complex z is

    essentially

    the same.

    The

    prog

    ram insure

    s

    that

    TEST

    ? V2

    lONS (;11 11

    /, /,+ I

    3)

    4)

    where L =

    max (MAGZ

    +

    1,

    NB

    ),

    and NSIG

    is

    the

    maximum number

    of significant

    decimal

    digits in a

    double-precisi

    on variable on the computer

    being used.

    Then N is

    the

    least n such that

    IplIl

    > TEST

    and N

    is the l

    east n ?N such that

    IplI l > TEST =

    ~

    TE

    ST,

    P

    s

    ,-

    112

    5)

  • 7/26/2019 jresv77Bn3-4p111

    3/4

    nsequence of 4) and

    (5), the

    relative truncation

    error 1 1 is

    less than

    t IO - s,C for

    n

    in

    the rang

    e MAGZ

    < n

    :s; L; see

    [1

    , sec. 5].

    For

    n

    :s; MAGZ, it may be im possible to bound the relat ive truncation error in the above manner,

    ing to loss

    of

    precision

    due

    to can ce llation in

    1).

    Experience indicates that

    this

    loss is negligible

    ce

    pt when the magnitud e

    of ~ , N ) oscillates

    as

    n =

    MAGZ, MAGZ - 1, .

    .. 0

    in the

    back-recursion

    calculating j s ,

    with Re

    Z 1m

    z .

    In

    this ca

    se,

    th e

    re

    will

    be about

    D

    de

    c

    imals of pre

    cision

    the

    values

    : V ) ,

    where

    D

    is th e nu mber

    of

    dec i mals in JMA

  • 7/26/2019 jresv77Bn3-4p111

    4/4

    The

    program sets TEST

    l

    2 . l'iSlG. The normalization factor fL is e

    izfj

    MA{;Z(Z) [ l sec. 5] , so

    I

    N I I I

    = JMA ;Z Z)

    2 p ~

    :S; :S;

    ps,+l) (p\ ,-1)2IfJII (Ps ,+l) Ps,-1)2

    1

    2

    6)

    Th

    e bound

    6)

    holds for

    the

    first, third, fourth and sixth

    equations

    of 3);

    the

    derivations

    are

    the same . Similarly,

    the second and

    fifth

    equations

    yield

    The se bounds

    ar

    e rather

    weak,

    and the error I5

    Uv

    / fL I turns out to be less than

    -N S

    l(;.

    4

    eferences

    [IJ

    Olver

    , F. W. J

    .

    and Sookne, D

    ].

    A note on

    the backward recurre

    nce algorithms,

    Mathematics

    of

    Computation

    , Vo

    l. 26,

    No. 120,

    October

    1972. pp.

    941-947.

    [2J Olver. F. W. J., Numerica l Solutions of

    Second

    Ord

    er

    Difference

    Equatio

    ns, Nat. Bur.

    Stand.

    U .S.), 7lB (Math. and

    Math. Phys

    .)

    . Nos. 2 3 ,

    111

    - 129 (1967).

    [3] British

    Assoc

    . for the Advance ment of

    Science.

    Bessel Functions-Part 11.

    Mathemati

    ca l Tables. Vol.

    10

    (Cambridge

    University Pr ess. Ca mbrid ge 1952).

    [4] National Bureau of Standards , Handbook of Mathemati ca l

    Functions.

    Nat. Bur.

    Stand.

    (U.S.). Appl. Math. Ser. 55,

    (1964).

    (paper 77B3 4-385)

    4