Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id CD9B29FB8ED for ; Sat, 21 Apr 2007 02:21:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 47098-01-7 for ; Sat, 21 Apr 2007 02:20:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id CF61F9FBA0C for ; Sat, 21 Apr 2007 02:20:48 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 51062308E2; Sat, 21 Apr 2007 07:20:47 +0200 (MET DST) Date: Sat, 21 Apr 2007 01:20:46 -0400 From: Lew User-Agent: Thunderbird 1.5.0.9 (X11/20070102) MIME-Version: 1.0 X-Newsgroups: pgsql.sql Subject: Re: Floating point type to store numbers References: <4838.63.118.86.10.1176836034.squirrel@www.88thstreet.com> <20070417190443.GA9094@phlogiston.dyndns.org> <19968.63.118.86.10.1176842013.squirrel@www.88thstreet.com> <20070417205318.GC9094@phlogiston.dyndns.org> In-Reply-To: <20070417205318.GC9094@phlogiston.dyndns.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Lines: 20 X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.34 To: pgsql-sql@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/205 X-Sequence-Number: 28205 Andrew Sullivan wrote: > On Tue, Apr 17, 2007 at 04:33:33PM -0400, Radhika Sambamurti wrote: >> Andrew, >> This has been quite helpful. My main concern is CPU cost. Thanks for the >> input. > > You're welcome. Are you sure your main concern should be CPU cost? > It's true that numeric is more costly that float in a lot of cases, > but I know at least one auditor who will refuse to certify results > from programs that anywhere use floating-point storage or calculation > on accounting data. The problem is really that you can get compound > errors -- very small rounding errors several times can turn out to be > a big problem. (One quick primer that can help you understand this > is at .) Would you rather have wrong answers really, really fast, or right answers fast enough? -- Lew