A library to efficiently evaluate Bessel and Hankel functions of all kinds in C. This library includes full support for complex input and output parameters.
This project provides a standard C interface for the library available here.
With the provided library interface you can compute
- Bessel functions of first and second kind of any order (also negative orders)
- Hankel functions of first and second kind of any order (also negative orders)
- Derivatives of any order of the functions described in 1. and 2.
- Clone this project to your machine
git clone https://github.com/DL6ER/complex_bessel.git
cd complex_bessel
- Install and use
cmake
sudo apt-get install cmake
bash build.sh
- Install library (the library will be installed to
/usr
by default)
cd build
sudo make install
cd ..
- Run test program to verify the library is working correctly
gcc test.c -lcomplex_bessel -lm
./a.out
double complex bessel(double order, int kind, double complex z);
double complex besselJ(double order, double complex z);
double complex besselY(double order, double complex z);
These routines compute the Bessel functions for any given order. besselJ
(first kind) and besselY
(second kind) are provided as short handles for the more generic bessel
function.
double complex hankel(double order, int kind, double complex z);
double complex hankelH1(double order, double complex z);
double complex hankelH2(double order, double complex z);
These routines compute the Hankel functions for any given order. hankelH1
(first kind) and hankelH2
(second kind) are provided as short handles for the more generic hankel
function.
double complex besselDiff(double order, int kind, int n, double complex z);
double complex besselJdiff(double order, int n, double complex z);
double complex besselYdiff(double order, int n, double complex z);
double complex hankelDiff(double order, int kind, int n, double complex z);
double complex hankelH1diff(double order, int n, double complex z);
double complex hankelH2diff(double order, int n, double complex z);
These routines compute the n-th derivative of the Bessel/Hankel functions for any given order. besselJdiff
(Bessel, first kind), besselYdiff
(Bessel, second kind), hankelH1diff
(Hankel, first kind), and hankelH2diff
(Hankel, second kind) are provided as short handles for the more generic besselDiff
and hankelDiff
functions.
This project is copyrighted under the latest version of the European Union Public License (EUPL).
Please see LICENSE
file for your rights under this license.
The code in subfolder complex_bessel
is licensed under LGPL-3.0 (see also LICENSE
file therein).