Exponentially scaled modified Bessel functions of order zero and one.

The functions are conventionally called i0e and i1e. The exponentially scaled version is more numerically stable. The standard Bessel functions can be obtained as i0(x) = exp(|x|) i0e(x)

The code is ported from Cephes and tested against SciPy.
This commit is contained in:
Michael Figurnov
2018-05-31 15:34:53 +01:00
parent 6af1433cb5
commit f216854453
12 changed files with 731 additions and 0 deletions

View File

@@ -82,6 +82,8 @@ struct default_packet_traits
HasPolygamma = 0,
HasErf = 0,
HasErfc = 0,
HasI0e = 0,
HasI1e = 0,
HasIGamma = 0,
HasIGammac = 0,
HasBetaInc = 0,

View File

@@ -44,6 +44,8 @@ template<> struct packet_traits<float> : default_packet_traits
HasPolygamma = 1,
HasErf = 1,
HasErfc = 1,
HasI0e = 1,
HasI1e = 1,
HasIGamma = 1,
HasIGammac = 1,
HasBetaInc = 1,
@@ -73,6 +75,8 @@ template<> struct packet_traits<double> : default_packet_traits
HasPolygamma = 1,
HasErf = 1,
HasErfc = 1,
HasI0e = 1,
HasI1e = 1,
HasIGamma = 1,
HasIGammac = 1,
HasBetaInc = 1,