From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id D018DBBBC for ; Sun, 19 Feb 2006 18:01:16 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k1JH1Gjo000468 for ; Sun, 19 Feb 2006 18:01:16 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA32343 for ; Sun, 19 Feb 2006 18:01:15 +0100 (MET) Received: from furbychan.cocan.org (furbychan.cocan.org [80.68.91.176]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k1JH0vKB026366 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sun, 19 Feb 2006 18:01:15 +0100 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1FArvE-0001li-00; Sun, 19 Feb 2006 17:00:32 +0000 Date: Sun, 19 Feb 2006 17:00:32 +0000 To: Brian Hurt Cc: caml-list@inria.fr Subject: Re: [Caml-list] What library to use for arbitrary precision decimals Message-ID: <20060219170023.GA6769@furbychan.cocan.org> References: <20060219163838.GA32465@furbychan.cocan.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i From: Richard Jones X-Miltered: at nez-perce with ID 43F8A45C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 43F8A449.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 semantics:01 notepad:01 wrote:01 arbitrary:01 exception:01 hmm:02 somewhere:02 library:03 library:03 brian:04 indeed:05 quite:06 marketing:93 multiply:06 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Sun, Feb 19, 2006 at 10:53:47AM -0600, Brian Hurt wrote: > Hmm. There are problems definin that library. What are the semantics? > If I add a NUMERIC(6,4) (2 digits to the left of the point and 4 to the > righ) and a NUMERIC(7,2) (5 digits to the left of the point and 2 to the > right), what precision is the result? NUMERIC(4,2) (2 digits to the left > of the point and 2 to the right)? NUMERIC(9,4) (5 digits to the left of > the point and 4 digits to the right)? How does roundoff work? If I take > the NUMERIC(6,4) number 62.0000 and multiply it by the NUMERIC(6,4) number > 02.0000, what answer do I get? The NUMERIC(6,4) number 24.000? The > NUMERIC(7,4) number 124.000? Or does it throw an exception? Well yes indeed. I'm quite sure there's a SQL specification somewhere which answers this :-) Rich. -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com Team Notepad - intranets and extranets for business - http://team-notepad.com