p.s. my `is_effectively_unity` would be wrong for `0.9999...`. more simply `abs(2.*p - int(2.*p)) < 1.e-14)` or so, which would also capture half-integer dimensions (the only ones that I've ever seen in a physically realistic context).