Function fermi_function (o2scl)

O2scl : Function List

template<class fp_t>
fp_t o2scl::fermi_function(fp_t x)

Calculate a Fermi-Dirac distribution function safely.

This calculates a Fermi-Dirac distribution function

\( \left(1+\exp x\right)^{-1} \)

Note

While this function tries to avoid this, this function may return Inf or NAN if the argument is too large large, depending on the machine precision.