caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Sven Luther <luther@dpt-info.u-strasbg.fr>
To: Christoph Bauer <c_bauer@informatik.uni-kl.de>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Need unsigned int
Date: Mon, 20 Jan 2003 21:58:20 +0100	[thread overview]
Message-ID: <20030120205820.GA3051@iliana> (raw)
In-Reply-To: <m3d6mrej5p.fsf@diebuntekuh.de>

On Mon, Jan 20, 2003 at 08:05:38PM +0100, Christoph Bauer wrote:
> Hi, 
> 
> my program need to calculate a hash key of a matrix (with dimension 8
> x 8).  It is necessary that this calculation is very fast, so my
> program will update the hash key after every small modification of the
> matrix. My problem is that the hash key should be an unsigned int
> or an unsigned long in. 
> 
> My problem occurs here (Mersenne prime number 2^31-1):
> let big_prim = 2147483647
> val big_prim : int = -1

Solution #1 : buy yourself a 64bit box, and you will have integers upto
2^63-1 :)))

Solution #2 : Use the Int64 module.

Solution #3 : Use the ocaml bignum module.

Friendly,

Sven Luther
-------------------
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


  reply	other threads:[~2003-01-20 20:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-20 19:05 Christoph Bauer
2003-01-20 20:58 ` Sven Luther [this message]
2003-01-22 14:55 ` Nicolas Cannasse
2003-01-23 15:00   ` Damien Doligez
2003-01-24  0:39     ` David Chase
2003-01-25 13:50     ` Nicolas Cannasse

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=20030120205820.GA3051@iliana \
    --to=luther@dpt-info.u-strasbg.fr \
    --cc=c_bauer@informatik.uni-kl.de \
    --cc=caml-list@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;
as well as URLs for NNTP newsgroup(s).