From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id C53F7BC48 for ; Wed, 13 Apr 2005 20:29:03 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j3DIT34o015569 for ; Wed, 13 Apr 2005 20:29:03 +0200 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 UAA22355 for ; Wed, 13 Apr 2005 20:29:02 +0200 (MET DST) Received: from smtp01.isp.itmonitor.net (smtp01.isp.itmonitor.net [207.158.33.182]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j3DIT1xV031788 for ; Wed, 13 Apr 2005 20:29:02 +0200 Received: from tfb.com (host-66-81-194-70.rev.o1.com [66.81.194.70]) by smtp01.isp.itmonitor.net (Postfix) with ESMTP id 185B0A5CEF1; Wed, 13 Apr 2005 11:29:01 -0700 (PDT) Message-ID: <425D64EA.2020105@tfb.com> Date: Wed, 13 Apr 2005 11:28:58 -0700 From: Ken Rose Reply-To: rose@acm.org User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] ocaml, int32/64, bigarray and unsigned values ... References: <20050411074619.GA26797@pegasos> <20050411125705.GB14415@localhost> <20050411153551.GA10362@pegasos> In-Reply-To: <20050411153551.GA10362@pegasos> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 425D64EF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 425D64ED.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 bigarray:01 sven:01 luther:01 ...:98 wrote:01 int:01 unsigned:02 unsigned:02 bit:10 bit:10 afterwards:11 ken:11 ken:11 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.2 X-Spam-Level: Sven Luther wrote: > Yeah, bit shifting should be ok, since the sign is ignored for those. But be careful about right shifts, which are different signed than unsigned. Signed repeats the sign bit, while unsigned shifts in zeroes. If you mask afterwards, it should be fine. - ken