pub fn inverse_langevin(y: Scalar) -> ScalarExpand description
Returns the inverse Langevin function.
x = \mathcal{L}^{-1}(y)The first few terms of the Maclaurin series are used when $|y|<3e^{-3}$.
x \sim 3y + \frac{9}{5}y^3 + \mathrm{ord}(y^5)Two iterations of Newton’s method are used to improve upon an initial guess given by inverse_langevin_approximate() otherwise.
The resulting maximum relative error is below $1e^{-12}$.