Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] Runtime overflow and what to do
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-10-15 (19:25)
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 Archives:
Bug reports: FAQ:
Beginner's list: