You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ultra-narrow float ranges: more bins than representable values, so centres do not map back to their bins #86
This FILE item comes from the external review of #85 (ChatGPT batch 28, claim C1). It is not a blocker.
Take the range [0, smallest subnormal] with 4 bins. It holds fewer representable float64 values than bins. float_bin_centres() therefore returns the endpoints twice (0, 0, 5e-324, 5e-324), and centres 1 and 2 do not map back to bins 1 and 2 through _bin_index. No representable value can fall in those inner bins, so no measured value is wrong. But the "bins and centres agree" invariant is silently untrue there.
Fix: pick one of these and test it.
Document that bins no value can fall in may share a representative centre.
Reduce the effective bin count, recording that it was reduced, when the range holds fewer representable floats than the requested bins.
The review also notes that the claim "every previously valid histogram is bit-identical" can only be shown by running the old and new code on a generated corpus that includes extremes and subnormals. Consider adding that comparison.
Activity