DEFINITION MODULE SpezFunkt3;

  (*------------------------------------------------------------------------*)
  (* Stellt verschiedene mathematische Funktionen zur Verf"ugung            *)
  (* This library provides some special mathematical functions.             *)
  (*------------------------------------------------------------------------*)
  (* Implementation : Michael Riedl                                         *)
  (* Licence        : GNU Lesser General Public License (LGPL)              *)
  (*------------------------------------------------------------------------*)

  (* $Id: SpezFunkt3.def,v 1.4 2018/05/16 07:08:32 mriedl Exp mriedl $ *)

PROCEDURE DBesselJ0(x : LONGREAL) : LONGREAL;

          (*----------------------------------------------------------------*)
          (* Berechnet die Bessel Function erster Art der Ordnung Null      *)
          (* fuer das Argument x. Abgeleitet aus der CERN library 2006.     *)
          (*----------------------------------------------------------------*)

PROCEDURE BesselJ0(x : LONGREAL) : LONGREAL;

          (*----------------------------------------------------------------*)
          (* Berechnet die Besselfunktion J0(x) auf ca. 14-15 Stellen       *)
          (* Computes the ordinary bessel function of the first kind of     *)
          (* order zero with argument x                                     *)
          (*----------------------------------------------------------------*)

PROCEDURE BesselJ1(x : LONGREAL) : LONGREAL;

          (*---------------------------------------------------------------*)
          (* Computes the ordinary bessel function of the first kind of    *)
          (* order one with argument x                                     *)
          (*---------------------------------------------------------------*)

PROCEDURE BesselJn(x : LONGREAL;
                   n : CARDINAL) : LONGREAL;

          (*----------------------------------------------------------------*)
          (* Berechnet die Besselsche Funktion erster Art N-ter Ordnung.    *)
          (*----------------------------------------------------------------*)

PROCEDURE BesselJN(    x  : LONGREAL;
                       n  : INTEGER;
                   VAR Jn : ARRAY OF LONGREAL);
                       
          (*----------------------------------------------------------------*)
          (* Generates an array of ordinary bessel functions of the first   *)
          (* kind of order l (l = 0,...,n) with argument x.                 *)
          (*                                                                *)
          (*   x  : the argument of the bessel functions                    *)
          (*   n  : the upper bound of the indices of array j, n >= 0       *)
          (*   Jn : array j[0:n], on exit j[l] is the ordinary bessel       *)
          (*        function of the first kind of order l and argument x.   *)
          (*                                                                *)
          (* [3] Dautschi, W., "Computational aspects of three term         *)
          (*     recurrence relations", SIAM review, 9, pp 24-82 (1967)     *)
          (*----------------------------------------------------------------*)

PROCEDURE ZeroBesselJ0 (n : INTEGER) : LONGREAL;

          (*----------------------------------------------------------------*)
          (* Compute the n-th zero of the Bessel function of order 0        *)
          (* (BesselJ0) (the 0-th zero being 0), input parameter n beeing   *)
          (* the order of the desired zero with n > 0                       *)
          (*                                                                *)
          (* Derived from Pascal mathlib library                            *)
          (*----------------------------------------------------------------*)

PROCEDURE ZeroBesselJ1(n : CARDINAL) : LONGREAL;

          (*----------------------------------------------------------------*)
          (* Compute the n-th zero of the Bessel function of order 1        *)
          (* (BesselJ1) (the 0-th zero being 0), input parameter n beeing   *)
          (* the order of the desired zero                                  *)
          (*                                                                *)
          (* Derived from Pascal mathlib library                            *)
          (*----------------------------------------------------------------*)

PROCEDURE BesselY0(x : LONGREAL) : LONGREAL;

          (*----------------------------------------------------------------*)
          (* Berechnet die Besselsche Funktion zweiter Art 0-ter Ordnung.   *)
          (*----------------------------------------------------------------*)

PROCEDURE DBesselY1(X : LONGREAL) : LONGREAL;

          (*----------------------------------------------------------------*)
          (* Berechnet die Bessel Function zweiter Art der Ordnung eins     *)
          (* des Arguments X. Abgeleitet aus der CERN library 2006.         *)
          (*----------------------------------------------------------------*)

PROCEDURE BesselY01(    x     : LONGREAL;
                    VAR y0,y1 : LONGREAL);

          (*---------------------------------------------------------------*)
          (* Computes the ordinary bessel functions of the second kind of  *)
          (* orders zero and one with argument x, x > 0                    *)
          (*                                                               *)
          (* x  : the argument of the bessel functions, x > 0              *)
          (* y0 : on exit y0 has the value of the ordinary bessel function *)
          (*      of the second kind of order 0 and argument x             *)
          (* y1 : on exit y1 has the value of the ordinary bessel function *)
          (*      of the second kind of order 1 and argument x             *)
          (*---------------------------------------------------------------*)

PROCEDURE Hankel01(x : LONGREAL) : LONGCOMPLEX;

          (*----------------------------------------------------------------*)
          (* Berechnet die komplexe Hankel-Funktion erster Art der          *)
          (* Ordnung 0 f"ur das Argument x. ACM Algorithmus 124 fuer x < 8, *)
          (* asymtotische Entwicklung fuer x > 17.5, J0,Y0 sonst            *)
          (*                                                                *)
          (* [1] Schaefer, Luis J.;  Comm. of the ACM 5(9), 483 (1962)      *)
          (* [2] Abramowitz, M.; Stegun, I.; Handbook of Mathematical       *)
          (*     Functions with Formulas, Graphs, and Mathematical Tables,  *)
          (*     Washington, D. C.: U.S. Government Printing Office, 1972.  *)
          (*----------------------------------------------------------------*)

END SpezFunkt3.
