comnum.optimal_loading#

comnum.optimal_loading(bits)#

The loading factor A/σ that minimises the error of a Gaussian input (the optimal uniform quantiser of Max 1960).

Parameters:

bits (int) – resolution N.

Returns:

the optimal loading factor.

Return type:

float

Examples

>>> import comnum
>>> round(comnum.optimal_loading(1), 3)
1.596