From: Reinhard Budde <reinhard.budde@gmd.de>
To: CAML <caml-list@inria.fr>
Subject: Re: Logical operators...
Date: Fri, 27 Aug 1999 11:49:48 +0200 [thread overview]
Message-ID: <37C65F3C.DA023DA8@gmd.de> (raw)
In-Reply-To: <37C52EEB.AE4@irit.fr>
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
prev parent reply other threads:[~1999-08-28 17:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-26 12:11 Hugues CASSE
1999-08-26 23:18 ` John Prevost
1999-08-27 9:07 ` Jean-Christophe Filliatre
1999-08-27 9:49 ` Reinhard Budde [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=37C65F3C.DA023DA8@gmd.de \
--to=reinhard.budde@gmd.de \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox