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
Narrow float64 histogram ranges mis-bin pixels (halved range rounds to zero, n / half_range overflows) #84
half_range = hi*0.5 - lo*0.5 can round to zero for distinct subnormal endpoints. float_bin_centres then collapses distinct bins.
n / half_range can overflow to inf for a very narrow non-zero range, before the integer bin cast.
Either way, finite pixels can be mis-binned and pooled percentiles corrupted.
Fix: compute a bounded ratio first and multiply by n after. When hi - lo is finite, use (value - lo) / (hi - lo). Keep the halved form only for the large-range case where hi - lo overflows. Apply the same rule to bin centres and _bin_index. The large-range fix of #76 (±float64 max) must still pass.
Activity