NAG CL Interface
s18gkc (bessel_​j_​seq_​complex)

1 Purpose

s18gkc returns a sequence of values for the Bessel functions Jα+n-1z or Jα-n+1z for complex z, non-negative α<1 and n=1,2,,N+1.

2 Specification

#include <nag.h>
void  s18gkc (Complex z, double a, Integer nl, Complex b[], NagError *fail)
The function may be called by the names: s18gkc, nag_specfun_bessel_j_seq_complex or nag_complex_bessel_j_seq.

3 Description

s18gkc evaluates a sequence of values for the Bessel function of the first kind Jαz, where z is complex and nonzero and α is the order with 0α<1. The N+1-member sequence is generated for orders α,α+1,,α+N when N0. Note that + is replaced by - when N<0. For positive orders the function may also be called with z=0, since Jq0=0 when q>0. For negative orders the formula
is used to generate the required sequence. The appropriate values of Jqz and Yqz are obtained by calls to s17dcc and s17dec.

4 References

NIST Digital Library of Mathematical Functions

5 Arguments

1: z Complex Input
On entry: the argument z of the function.
Constraint: z0.0,0.0 when nl<0.
2: a double Input
On entry: the order α of the first member in the required sequence of function values.
Constraint: 0.0a<1.0.
3: nl Integer Input
On entry: the value of N.
Constraint: absnl101.
4: b[absnl+1] Complex Output
On exit: with fail.code= NE_NOERROR or NW_SOME_PRECISION_LOSS, the required sequence of function values: b[n-1] contains J α+n-1 z if nl0 and J α-n+1 z otherwise, for n=1,2,,absnl+1.
5: fail NagError * Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).

6 Error Indicators and Warnings

Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
On entry, argument value had an illegal value.
On entry, nl=value.
Constraint: nl101.
On entry, nl=value.
Constraint: when nl<0, z0.0,0.0.
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
Computation abandoned due to the likelihood of overflow.
On entry, a=value.
Constraint: a<1.0.
On entry, a=value.
Constraint: a0.0.
Computation abandoned due to failure to satisfy the termination condition.
Computation abandoned due to total loss of precision.
Computation completed but some precision has been lost.

7 Accuracy

All constants in s17dcc and s17dec are specified to approximately 18 digits of precision. If t denotes the number of digits of precision in the floating-point arithmetic being used, then clearly the maximum number of correct digits in the results obtained is limited by p=mint,18. Because of errors in argument reduction when computing elementary functions inside s17dcc and s17dec, the actual number of correct digits is limited, in general, by p-s, where s max1,log10z,log10α represents the number of digits lost due to the argument reduction. Thus the larger the values of z and α, the less the precision in the result.

8 Parallelism and Performance

s18gkc is not threaded in any implementation.

9 Further Comments


10 Example

This example evaluates J0z,J1z,J2z and J3z at z=0.6-0.8i, and prints the results.

10.1 Program Text

Program Text (s18gkce.c)

10.2 Program Data

Program Data (s18gkce.d)

10.3 Program Results

Program Results (s18gkce.r)