How to Get the Size of Integers in OCaml
OCaml’s int type size depends on your platform’s architecture. On 64-bit systems, int is 63 bits; on 32-bit systems, it’s 31 bits. This catches many people off guard when they test bitwise operations. Here’s why: OCaml uses one bit as a tag to distinguish integers from pointers at runtime (the least significant bit). So on…
