Interactive Quantization Laboratory

Visualize the mapping of continuous real values to discrete integers. New enhancements include a 2D Staircase Function, live Binary translation, an Auto-Sweep tool, a Strict Symmetric mode, and an Error Landscape visualizer.

Presets

System Parameters

28

Test Value

Display

1D Mapping View
Staircase Transfer Function
Error Landscape (r - r̂)

1. Calculate Constants

Target Bounds: q ∈ [-8, 7]
S = rmax - rmin qmax - qmin = 0.1333
Z = round(qmin - rmin/S) = 0

2. Quantize & Dequantize

Quantize (Real → Integer):
q = clip(round(r/S)+Z) = 3
Binary (Bits): 0011
Dequantize (Integer → Approx Real): = S(q - Z) = 0.4000

3. Error Analysis (Error = r - r̂)

Total Error 0.0500
Rounding Error 0.0500
Clipping Error 0.0000