Browse thread
int_of_string bug
-
Yaron Minsky
- Oliver Bandel
-
Brian Hurt
-
Yaron Minsky
-
skaller
-
Erik de Castro Lopo
- skaller
-
Markus Mottl
-
Toby Kelsey
- ls-ocaml-developer-2006@m...
-
Toby Kelsey
-
Erik de Castro Lopo
-
skaller
-
Yaron Minsky
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2007-04-03 (22:30) |
From: | ls-ocaml-developer-2006@m... |
Subject: | Re: [Caml-list] int_of_string bug |
Toby Kelsey <toby.kelsey@gmail.com> writes: > Markus Mottl wrote: > >> The problem is just shifted to bigger numbers. This problem arises >> with all integer conversion functions, i.e. Int64.of_string, >> Int32.of_string, Nativeint.of_string, int_of_string. >> Regards >> Markus > > This bug is not just a conversion problem: > > # let x = 1073741824;; > val x : int = -1073741824 > # (x < 0) && (x >= -x);; > - : bool = true # let x = - 1073741824;; val x : int = -1073741824 # -x;; - : int = -1073741824 But this is as specified for modular ints. No surprise here ... Regards -- Markus