The And constructor (and Or, etc) requires an immediate to be at most 32-bits, but it checks this property incorrectly, basically checking the integer as a 32-bit signed integer (thus 31-bits + sign). This means, e.g. #xFFFFFFFF is rejected even though (32-bit-integer? #xFFFFFFFF) produces #t. A better check would be that the argument is either a 32-bit non-negative integer or a negative 31-bit integer, which is exactly what 32-bit-integer? recognizes.
The And constructor (and Or, etc) requires an immediate to be at most 32-bits, but it checks this property incorrectly, basically checking the integer as a 32-bit signed integer (thus 31-bits + sign). This means, e.g. #xFFFFFFFF is rejected even though
(32-bit-integer? #xFFFFFFFF)produces#t. A better check would be that the argument is either a 32-bit non-negative integer or a negative 31-bit integer, which is exactly what32-bit-integer?recognizes.