Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Raj B <rajb@rice.edu>
To: caml-list@yquem.inria.fr
Subject: Int64 overflow checks
Date: Mon, 30 Apr 2007 12:24:12 -0500	[thread overview]
Message-ID: <A6FA37DD-F163-4B0C-99E5-4BBED31CD56A@rice.edu> (raw)

Hi

I am writing an implementation of the Python programming language in  
OCaml and ran into an interesting issue.

Python allows the programmer to implicitly perform arbitrary-sized  
integer operations by switching internally between its 'int' and  
'long' types. (which seems to translate to OCaml's int64 and BigInt).

I found an OCaml library on a mailing list which checks for overflow  
in 'normal' 32-bit integer operations. How can I check for overflows  
in int64 operations so I can switch to big-int if that happens?


Thanks!
Raj



             reply	other threads:[~2007-04-30 17:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-30 17:24 Raj B [this message]
2007-05-01  2:41 ` [Caml-list] " skaller
2007-05-01  2:45 ` Jon Harrop

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A6FA37DD-F163-4B0C-99E5-4BBED31CD56A@rice.edu \
    --to=rajb@rice.edu \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox