From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA06404 for caml-redistribution; Sat, 28 Aug 1999 19:39:44 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA16111 for ; Fri, 27 Aug 1999 11:49:54 +0200 (MET DST) Received: from mail.gmd.de (mail.gmd.de [129.26.8.90]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id LAA12016 for ; Fri, 27 Aug 1999 11:49:52 +0200 (MET DST) Received: from reichenau.gmd.de (reichenau.gmd.de [129.26.12.135]) by mail.gmd.de (8.8.8/8.8.8) with SMTP id LAA15207 for ; Fri, 27 Aug 1999 11:49:52 +0200 (MET DST) Received: from gmd.de (localhost) by reichenau.gmd.de with SMTP id AA24539 (5.67b/IDA-1.5 for ); Fri, 27 Aug 1999 11:49:48 +0200 Sender: weis Message-Id: <37C65F3C.DA023DA8@gmd.de> Date: Fri, 27 Aug 1999 11:49:48 +0200 From: Reinhard Budde Organization: GMD X-Mailer: Mozilla 4.61 [en] (X11; I; SunOS 5.5 sun4u) X-Accept-Language: de-DE Mime-Version: 1.0 To: CAML Subject: Re: Logical operators... References: <37C52EEB.AE4@irit.fr> Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit Hugues CASSE wrote: > Is there a bug or is there a way to get the correct result... > # 0xffff0000 lsr 16;; > - : int = 32767 > while > # 0x0000ffff;; > - : int = 65535 ints are represented with 31 bits. This is sometimes suprising: Objective Caml version 2.01 # 0xffff0000;; - : int = -65536 # 0x7fff0000;; - : int = -65536 Consequently: # 0xffff0000 = 0x7fff0000;; - : bool = true 0xffff0000 ist not represented in ocaml as you expected Reinhard -------------- Reinhard Budde reinhard.budde@gmd.de GMD - German National Research Center for Information Technology AiS - Autonomous intelligent Systems D-53754 St.Augustin tel: +2241-14-2417,fax: +2241-14-2324