Exact bucket counts, different p99 Hesela, 2026-11-20 This constructed arithmetic example uses two populations of 100 positive durations. A: 1 observation at 1.1 ms, 98 at 1.4 ms, 1 at 1.9 ms. B: 1 observation at 1.1 ms, 49 at 1.2 ms, 49 at 1.6 ms, 1 at 1.9 ms. Both have count 100, sum 140.2 ms, minimum 1.1 ms and maximum 1.9 ms. At scale 0, both place every observation in bucket 0, (1, 2] ms. Their nearest-rank p99 values differ: A = 1.4 ms; B = 1.6 ms. The rank is ceil(0.99 * 100) = 99. Timestamps, attributes and units can be chosen identically, and neither population contains zeros or negative values. Exact count coarsening therefore does not imply an exact original percentile. The model separately checks that a scale-2 histogram coarsened to scale 0 equals a direct scale-0 histogram. It uses rational arithmetic; fractions in results.json are exact values, not measurement precision claims. Scope: not an SDK execution, production trace, performance benchmark, complete wire-format model or test of producer rounding. Finite tests support this example; they are not a proof about every implementation. The general bucket formula is specified at: https://opentelemetry.io/docs/specs/otel/metrics/data-model/#exponentialhistogram Files: https://hesela.dev/research/exponential-histograms/model.py https://hesela.dev/research/exponential-histograms/test_model.py https://hesela.dev/research/exponential-histograms/results.json Reproduce with Python 3 standard library in a directory containing those files: python3 model.py --check python3 -B -m unittest discover -s . -p test_model.py python3 -B -O -m unittest discover -s . -p test_model.py Related glossary: https://hesela.dev/terms/opentelemetry-exponential-histogram/ https://hesela.dev/terms/dgim-exponential-histogram/