From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 55483BBAF for ; Tue, 5 Jan 2010 14:26:25 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuIAAPLMQktRZ90xkWdsb2JhbACbWwEBAQEJCwoHEwOIMa5rhDAE X-IronPort-AV: E=Sophos;i="4.47,505,1257116400"; d="scan'208";a="41047681" Received: from mtaout03-winn.ispmail.ntl.com ([81.103.221.49]) by mail3-smtp-sop.national.inria.fr with ESMTP; 05 Jan 2010 14:26:21 +0100 Received: from aamtaout01-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20100105132619.YPAV17277.mtaout03-winn.ispmail.ntl.com@aamtaout01-winn.ispmail.ntl.com> for ; Tue, 5 Jan 2010 13:26:19 +0000 Received: from romulus.metastack.com ([81.102.132.77]) by aamtaout01-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20100105132619.UVQG13254.aamtaout01-winn.ispmail.ntl.com@romulus.metastack.com> for ; Tue, 5 Jan 2010 13:26:19 +0000 Received: from Tenor (dynamic90.vpdn.csx.cam.ac.uk [131.111.7.90]) (authenticated bits=0) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id o05DQFkq013282 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Tue, 5 Jan 2010 13:26:16 GMT From: "David Allsopp" To: "OCaml List" References: <4B4337A0.8000603@fiit.stuba.sk> In-Reply-To: <4B4337A0.8000603@fiit.stuba.sk> Subject: RE: [Caml-list] 2147483648l < 2147483647l Date: Tue, 5 Jan 2010 13:26:16 -0000 Message-ID: <000101ca8e0a$aa006450$fe012cf0$@romulus.metastack.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQLDro19qzdMCtSmfnfCXcGpCw8+8AIkYaIO Content-Language: en-gb Organization: MetaStack Solutions Ltd. X-Scanned-By: MIMEDefang 2.65 on 81.102.132.77 X-Cloudmark-Analysis: v=1.1 cv=1ggfb5FlKZQUfF3vzm9UBYZ2uTfLsbs/8dSljwg5+mE= c=1 sm=0 a=ZOzjf2MOAAAA:8 a=M4dTzAnj6rl2lgpx5PEA:9 a=hAvSML-xqEtS2UvdgUrvyZj4t9kA:4 a=H1paHlvfXV0A:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 X-Spam: no; 0.00; bool:01 bug:01 bug:01 wrote:01 integer:01 caml-list:01 int:01 int:01 behaviour:01 caml:02 max:06 inria:06 i'm:09 encoded:09 encoded:09 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