From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.8 required=5.0 tests=AWL,DNS_FROM_RFC_POST, HTML_10_20,HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id C1008BC37 for ; Sat, 16 May 2009 09:27:41 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjgDAFcIDkrRVdyuimdsb2JhbACCIDKURj8BAQEKCQwHDwWmBoETkDQBAwEDg34F X-IronPort-AV: E=Sophos;i="4.41,203,1241388000"; d="scan'208";a="26274004" Received: from mail-fx0-f174.google.com ([209.85.220.174]) by mail2-smtp-roc.national.inria.fr with ESMTP; 16 May 2009 09:27:36 +0200 Received: by fxm22 with SMTP id 22so2327560fxm.9 for ; Sat, 16 May 2009 00:27:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=8bNIVWyP+CMdpl7qAzq23w8kq69LYlMLQfu25Cu7nks=; b=iDQTo0bmngGgbRHmj+hd5nO5Ewe/mcCLwEQ2d2ZEzEg1BKLjsHHWr42Zx3rtXXRP5H f8CpDVwww+LHPpoLZpfnlfbUVDa4P55IcBAl+RgmY8zr4ncVsQhofhxEoRQITM/rThux 6aoBu+lAKjEZg8kAsgCVnu6h5R4MBsEbW3vwU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=nBMWIvSgU3863fhXIydxITI1ZoosI1ouGw3ZNRaPPte2BohZiAA3Tl5vJJXpOl9y/q WW3VhuVPiUPFW9r8a1qkzwnHTTYQ22eyZ7SM5ZGjzw4Zx+GHMIrFROADQQAr86HpzpYo yxpPs9D58V/+Q9Cnu8+imOKA3Y+rr77PHLoIY= MIME-Version: 1.0 Received: by 10.103.175.8 with SMTP id c8mr2715122mup.117.1242458856188; Sat, 16 May 2009 00:27:36 -0700 (PDT) Date: Sat, 16 May 2009 08:27:36 +0100 Message-ID: Subject: Data type representing 'Money' From: Conglun Yao To: caml-list@inria.fr Content-Type: multipart/alternative; boundary=001636b431b4c56f8b046a027e77 X-Spam: no; 0.00; ocaml:01 ocaml:01 data:02 data:02 float:03 float:03 representing:05 yao:09 example:10 example:10 maybe:10 maybe:10 similar:12 similar:12 exist:13 --001636b431b4c56f8b046a027e77 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi all, Is there any data type could be used to represent 'Money' in OCaml, similar to BigDecimal. I see a lot of programs using float directly. Maybe Num would be better, but less document could be found, for example, how to represent 20.27 Or there already exist a better solution. Thanks for any help. Conglun --001636b431b4c56f8b046a027e77 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi all,

Is there any data type could be used to represent 'Money= '=A0 in OCaml, similar to BigDecimal.
I see a lot of programs using= float directly. Maybe Num would be better, but less document could be foun= d, for example, how to represent 20.27

Or there already exist a better solution. Thanks for any help.

C= onglun
--001636b431b4c56f8b046a027e77--