<?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="2006/02/34c5b33a2ce71032c5bfbac81e30432f"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2006-02-19T16:38:42"
  subject="Re: [Caml-list] What library to use for arbitrary precision decimals"
  prev="2006/02/7ced1cf6716695b05c93739612f75c5d"
  next="2006/02/72ee455a5f011374a71925238a2ed762"
  prev-in-thread="2006/02/6a4ece1ab3283a32cdfc79d59c82478d"
  next-in-thread="2006/02/72ee455a5f011374a71925238a2ed762"
  prev-thread="2006/02/26e0e034e81973bfaabae58148b29f96"
  next-thread="2006/02/7ced1cf6716695b05c93739612f75c5d"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="What library to use for arbitrary precision decimals">
<msg 
  url="2006/02/e0d80c67993d25b72681b783bd13813a"
  from="Joshua Smith &lt;kognate@g...&gt;"
  author="Joshua Smith"
  date="2006-02-19T13:43:38"
  subject="What library to use for arbitrary precision decimals">
<msg 
  url="2006/02/6a4ece1ab3283a32cdfc79d59c82478d"
  from="Brian Hurt &lt;bhurt@s...&gt;"
  author="Brian Hurt"
  date="2006-02-19T15:44:16"
  subject="Re: [Caml-list] What library to use for arbitrary precision decimals">
<msg 
  url="2006/02/34c5b33a2ce71032c5bfbac81e30432f"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2006-02-19T16:38:42"
  subject="Re: [Caml-list] What library to use for arbitrary precision decimals">
<msg 
  url="2006/02/72ee455a5f011374a71925238a2ed762"
  from="Brian Hurt &lt;bhurt@s...&gt;"
  author="Brian Hurt"
  date="2006-02-19T16:53:25"
  subject="Re: [Caml-list] What library to use for arbitrary precision decimals">
<msg 
  url="2006/02/92ca6367f5929b8a8d393bd551a0f41c"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2006-02-19T17:01:16"
  subject="Re: [Caml-list] What library to use for arbitrary precision decimals">
<msg 
  url="2006/02/ea5f7ca7239b2b1d32ef4a745dbed037"
  from="Richard Jones &lt;rich@a...&gt;"
  author="Richard Jones"
  date="2006-02-19T17:13:26"
  subject="Re: [Caml-list] What library to use for arbitrary precision decimals">
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2006/02/024932e2e2c8b5b06b83662881c27c24"
  from="Jeremy Shute &lt;shutej@g...&gt;"
  author="Jeremy Shute"
  date="2006-02-19T17:21:44"
  subject="Re: [Caml-list] What library to use for arbitrary precision decimals">
<msg 
  url="2006/02/463692f8dc009e6672589f4cbd97f837"
  from="Brian Hurt &lt;bhurt@s...&gt;"
  author="Brian Hurt"
  date="2006-02-19T18:31:14"
  subject="Re: [Caml-list] What library to use for arbitrary precision decimals">
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>

Before we go too far down the currency track (where I agree, using
integers is the way to go), my actual requirement is for a natural
OCaml mapping for the PostgreSQL NUMERIC/DECIMAL type:

http://www.postgresql.org/docs/current/interactive/datatype.html#DATATYPE-NUMERIC-DECIMAL

The database can define types like NUMERIC(6,4) which means 6 decimal
digits in total, 4 of them after the decimal point -- for example,
12.3456

There doesn't seem to me to be a good natural map for this type in the
stdlib.

Rich.

PS. You can find latest progress on PG'OCaml here:

http://merjis.com/tmp/pgocaml-0.3.tar.gz

I've already converted a few of our bigger programs to use this library.

-- 
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com

</contents>

</message>

