<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/01/a7f0ca55dfc7972117511c4551434184"
  from="Sven Luther &lt;luther@d...&gt;"
  author="Sven Luther"
  date="2003-01-20T20:58:38"
  subject="Re: [Caml-list] Need unsigned int"
  prev="2003/01/b88cd7c071a69b46c1f1ab2c43a2bb81"
  next="2003/01/740ca05b3cb0c3e686a3998768c3564e"
  prev-in-thread="2003/01/72c455ab961d117e66091b9e50b158a7"
  next-in-thread="2003/01/2f8b8c3e56cbc57ad0828a8c4c361f8a"
  prev-thread="2003/01/a4cffb254f58984e709674a57450d264"
  next-thread="2003/01/18adbbf91ec34b35351de3a8ecc5092f"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Need unsigned int">
<msg 
  url="2003/01/72c455ab961d117e66091b9e50b158a7"
  from="Christoph Bauer &lt;c_bauer@i...&gt;"
  author="Christoph Bauer"
  date="2003-01-20T19:06:30"
  subject="[Caml-list] Need unsigned int">
<msg 
  url="2003/01/a7f0ca55dfc7972117511c4551434184"
  from="Sven Luther &lt;luther@d...&gt;"
  author="Sven Luther"
  date="2003-01-20T20:58:38"
  subject="Re: [Caml-list] Need unsigned int">
</msg>
<msg 
  url="2003/01/2f8b8c3e56cbc57ad0828a8c4c361f8a"
  from="Nicolas Cannasse &lt;warplayer@f...&gt;"
  author="Nicolas Cannasse"
  date="2003-01-22T13:51:49"
  subject="Re: [Caml-list] Need unsigned int">
<msg 
  url="2003/01/4d220c5232a3b748cd9592002eec3313"
  from="Damien Doligez &lt;damien.doligez@i...&gt;"
  author="Damien Doligez"
  date="2003-01-23T15:01:17"
  subject="Re: [Caml-list] Need unsigned int">
<msg 
  url="2003/01/be461c4ff942cdbf26f01b18b78f15db"
  from="David Chase &lt;chase@w...&gt;"
  author="David Chase"
  date="2003-01-24T00:39:59"
  subject="Re: [Caml-list] Need unsigned int">
</msg>
<msg 
  url="2003/01/8ee94a5b5e46b261b7599c6003b3a18b"
  from="Nicolas Cannasse &lt;warplayer@f...&gt;"
  author="Nicolas Cannasse"
  date="2003-01-25T12:46:27"
  subject="Re: [Caml-list] Need unsigned int">
</msg>
</msg>
</msg>
</msg>
</thread>

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

</contents>

</message>

