Browse thread
2147483648l < 2147483647l
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | David Allsopp <dra-news@m...> |
| Subject: | RE: [Caml-list] 2147483648l < 2147483647l |
Matej Kosik wrote: > I am sorry, I have a stupid question. > I would like to ask if this: > > # 2147483648l < 2147483647l;; > - : bool = true The bug is in fact: # 2147483648l;; - : int32 = -2147483648l and given that behaviour, the above result makes sense! But... > it cannot be encoded to 32-bit > signed integer encoded with 2's complement representation. and it's outside the range [Int32.min_int, Int32.max_int] However, it's a known bug - http://caml.inria.fr/mantis/view.php?id=4210 According to Mantis, it's fixed in 3.12 - I'm sure there's a reason that it's not been fixed in 3.11.2+rc1 David