Version française
Home     About     Download     Resources     Contact us    
Browse thread
Random questions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: AUGER <Cedric.Auger@l...>
Subject: Re: [Caml-list] Random questions
Le Thu, 03 Dec 2009 17:01:18 +0100, Damien Doligez  
<damien.doligez@inria.fr> a écrit:

>
> On 2009-12-03, at 12:00, AUGER wrote:
>
>> (* preliminary function: negate_minus_1 : int -> int : n |-> -n-1 *)
>> let negate_minus_1 = (lor) (-(max_int/2)-1) (* or inline the constant *)
>
> You probably mean this:
>
>     let negate_minus_1 = (lxor) (-1);;
>
> -- Damien

You are right

>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs


-- 
Cédric AUGER

Univ Paris-Sud, Laboratoire LRI, UMR 8623, F-91405, Orsay