Skip to main content

COUNT_INTEGER_TOL

Constant COUNT_INTEGER_TOL 

Source
pub const COUNT_INTEGER_TOL: f64 = 1.0e-9; // 1.0000000000000001E-9f64
Expand description

Round tolerance for recognising an integer-valued (count) response.

infer_from_response classifies a numeric response as a Poisson count when every value is finite, non-negative, and within this window of its nearest non-negative integer. The threshold is looser than BINOMIAL_BINARY_TOL because count columns frequently arrive as f64 round-trips of integers (CSV parse, integer→double promotion) that accumulate ULP-scale error well above 1e-12; 1e-9 admits those without ever matching genuinely continuous data, whose fractional parts are O(1).