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
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
"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
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
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.
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