poisson_quantile

std.stats.poisson_quantile · Level L5

The Poisson distribution's quantile with mean λ: the smallest whole k with P(K ≤ k) ≥ p. A bisection on whole numbers (a While over poisson_quantile_step), from [0, ⌊λ + t⌋ + 2] with t from Bernstein's inequality for the upper tail.

k = min{ k : Q(k + 1, λ) ≥ p }

Signature

poisson_quantile(p: f64[n], lam: f64[]) → i64[n]

Structure

The function as NOVA stores it: one box per input, operation and output, and arrows that carry values. A double border marks another library function this one runs — called once, or by Scan once per element; select it to open that function.

pf64[n]lamf64[]Negatenp_Log1pl10.333333NegateLMultiplyL3MultiplylamL2.0MultiplyL3sqMultiplylamL2AddradSqrtrootAddt1.0AddtopFloorDivftopAddftop2Casthi0Reshapehi10Multiplylo1ConcatstartWhile·poisson_quantile_stepbracketSlicek1Reshapekki64[n]
  • input
  • operation
  • constant
  • call
  • output

Verification

  • Signature proven by NOVA’s shape solver, for every size.
  • Agrees with the reference k = 0; while exp(-λ)·Σ_{j≤k} λʲ/j! < p: k += 1 to 80 digits (100-digit arithmetic), on all 40 test cases.
  • All 137 int64 results are exact: the error is zero.
  • Interpreter and NumPy backend return bit-identical results.
Accuracy in detail
correctly rounded (the int64 nearest the exact value)
100%
bit-equal to the NumPy formula in int64
100%
largest error, in units in the last place
0

Note

The reference adds the probabilities one by one until they reach p, so neither the incomplete gamma function nor the bisection checks itself. The answer is exact unless p lies within the CDF's own error of F(k); the verification bounds that case.

Identity

sha256:1ab816c8ee62e10d1025af3d2c6213e3ba8aac3387365ae37f000cb9239297ea

The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.

Control handle

Symbol
Ω:std.stats.poisson_quantile · Ω:poisson_quantile
Pins
sha256:5795a95269c6a6ebfeebf5607728a73bf06ccd0dc491683da23178bcbc468867this graph and the 2 it reaches through calls
Evidence
sha256:02b397ded5ab9db52df6aaac3dd3851c7f7745fe806f458d7626bb94762249d2the hash of its verification record
Needs
no capability: a pure function

Through NOVA’s control layer, the symbol launches this function only while the program still matches what it pins: a change to this graph, or to any graph it reaches, needs a migration first.

ΣEML 2026

Efficient New Language — a high-density semantic overlay for humans and AI agents.

This site’s demos run on the real EML toolchain, in your browser.

© 2026 EveMissLab (一言諾科技有限公司) / Neo.K. All rights reserved.