Browse thread
Re: [Caml-list] Runtime overflow and what to do
[
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: | -- (:) |
| From: | Xavier Leroy <xavier.leroy@i...> |
| Subject: | Re: [Caml-list] Runtime overflow and what to do |
> As a reward, note that your overflow test on addition raises overflow > when computing (max_int + 1) - 1, while this sum is actually > representable within a machine integer... More nit picking: max_int + 1 isn't representable, and (machine) addition evaluates it to min_int, which is clearly a case of overflow. - Xavier Leroy ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners