comnum.theory_normal_approximation#

comnum.theory_normal_approximation(n, k, ebn0_db)#

The normal approximation of the smallest block error probability of an (n, k) binary code over BPSK and AWGN (Polyanskiy, Poor & Verdú 2010).

Parameters:
  • n (int) – block length.

  • k (int) – information bits.

  • ebn0_db (float | array_like) – Eb/N0 (dB).

Returns:

the block error probability at every Eb/N0.

Return type:

float | numpy.ndarray

Raises:

ValueError – for values that are not real numbers.

Examples

>>> import comnum
>>> p = comnum.theory_normal_approximation(256, 128, [1.0, 3.0])
>>> bool(p[0] > p[1])
True