Skip to main content

i0f_small

Function i0f_small 

Source
pub(crate) fn i0f_small(x: f32) -> f64
Expand description

How polynomial is obtained described at [i0f_1_to_7p5].

Computes I0(x) as follows: I0(x) = 1 + (x/2)^2 * P(x)

This method valid only [0;1]

Generated by Wolfram Mathematica:

<<FunctionApproximations`
ClearAll["Global`*"]
f[x_]:=(BesselI[0,x]-1)/(x/2)^2
g[z_]:=f[2 Sqrt[z]]
{err, approx}=MiniMaxApproximation[g[z],{z,{0.0000001,1},6,0},WorkingPrecision->60]
poly=Numerator[approx][[1]];
coeffs=CoefficientList[poly,z];
TableForm[Table[Row[{"'",NumberForm[coeffs[[i+1]],{50,50}, ExponentFunction->(Null&)],"',"}],{i,0,Length[coeffs]-1}]]