_setup_legacy_bins uses max(box_lengths)/2 for the bin count while both kernels stop counting pairs at min(box_lengths)/2. For a 20x20x60 box with delta_r = 0.1:
n_bins = 299, r_max = 29.9 but no pair beyond r = 10.0 is ever counted
The 199 tail bins are structurally zero, and the differential column fabricates non-zero values over a range the kernel never measured (-839.77 in the slab reproduction). Cubic boxes are unaffected, which is why the parity fixtures never caught it.
_setup_legacy_binsusesmax(box_lengths)/2for the bin count while both kernels stop counting pairs atmin(box_lengths)/2. For a 20x20x60 box withdelta_r = 0.1:The 199 tail bins are structurally zero, and the differential column fabricates non-zero values over a range the kernel never measured (-839.77 in the slab reproduction). Cubic boxes are unaffected, which is why the parity fixtures never caught it.