Re: [Caml-list] 2147483648l < 2147483647l

2010-01-19 Thread Elnatan Reisner
On Jan 19, 2010, at 1:28 PM, David Allsopp wrote: Goswin von Brederlow wrote: # 2147483648l;; - : int32 = -2147483648l Isn't that documented properly? I think in the docs I saw at least that ocaml will silently overflow ints. Arithmetic operations are allowed to overflow silently but at

RE: [Caml-list] 2147483648l < 2147483647l

2010-01-19 Thread David Allsopp
Goswin von Brederlow wrote: > "David Allsopp" writes: > > > 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 = -21474

Re: [Caml-list] 2147483648l < 2147483647l

2010-01-19 Thread Goswin von Brederlow
"David Allsopp" writes: > 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 re

RE: [Caml-list] 2147483648l < 2147483647l

2010-01-05 Thread David Allsopp
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 e

Re: [Caml-list] 2147483648l < 2147483647l

2010-01-05 Thread Olivier Andrieu
On Tue, Jan 5, 2010 at 13:59, Matej Kosik wrote: > Hello, > > I am sorry, I have a stupid question. > I would like to ask if this: > >        # 2147483648l < 2147483647l;; >        - : bool = true > > should not regarded as a bug. In my project I need Int32 value and above > behavior surprised me.

[Caml-list] 2147483648l < 2147483647l

2010-01-05 Thread Matej Kosik
Hello, I am sorry, I have a stupid question. I would like to ask if this: # 2147483648l < 2147483647l;; - : bool = true should not regarded as a bug. In my project I need Int32 value and above behavior surprised me. Value 2147483648l should not be allowed at all because