diff --git a/common/coords.go b/common/coords.go index a3b2318..719073c 100644 --- a/common/coords.go +++ b/common/coords.go @@ -14,6 +14,8 @@ const ( numBitsPerComponent = 12 modulo = 1 << numBitsPerComponent maxPositive = modulo / 2 + minValue = -1 << numBitsPerComponent + maxValue = 1<>= 1 } - if x >= 1<= 1<= 1< zmax { + t.Errorf("zmin > zmax: %d > %d\n", zmin, zmax) + } + errors, success := 0, 0 for zcode := range outsiders(zmin, zmax) { nbm := NaiveBigMin(zmin, zmax, zcode) @@ -214,8 +227,9 @@ func TestBigMin(t *testing.T) { } if errors > 0 { cub := Cuboid{P1: c1, P2: c2} - t.Errorf("BigMin: %s %d errors out of %d (%f)\n", + t.Errorf("BigMin: %s (%d %d) %d errors out of %d (%f)\n", cub, + zmin, zmax, errors, errors+success, float64(errors)/float64(errors+success)) }