Version française
Home     About     Download     Resources     Contact us    
Browse thread
What library to use for arbitrary precision decimals
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] What library to use for arbitrary precision decimals

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