Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 4709C9FB7E4 for ; Tue, 17 Apr 2007 17:36:24 -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 08512-01 for ; Tue, 17 Apr 2007 17:36:21 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from rootabega.88thstreet.com (dsl254-071-237.nyc1.dsl.speakeasy.net [216.254.71.237]) by postgresql.org (Postfix) with ESMTP id 707759FB7BE for ; Tue, 17 Apr 2007 17:36:21 -0300 (ADT) Received: from www.88thstreet.com (localhost [IPv6:::1]) by rootabega.88thstreet.com (8.13.3/8.13.3) with ESMTP id l3HKaI5Q010239; Tue, 17 Apr 2007 16:36:20 -0400 (EDT) Received: from 63.118.86.10 (SquirrelMail authenticated user radhika) by www.88thstreet.com with HTTP; Tue, 17 Apr 2007 16:36:20 -0400 (EDT) Message-ID: <20944.63.118.86.10.1176842180.squirrel@www.88thstreet.com> In-Reply-To: References: <4838.63.118.86.10.1176836034.squirrel@www.88thstreet.com> Date: Tue, 17 Apr 2007 16:36:20 -0400 (EDT) Subject: Re: Floating point type to store numbers From: "Radhika Sambamurti" To: "Milen A. Radev" Cc: pgsql-sql@postgresql.org Reply-To: radhika@88thstreet.com User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/156 X-Sequence-Number: 28156 > I believe the manual is quite clear on that one ( > http://www.postgresql.org/docs/current/static/datatype-numeric.html#DATATYPE-FLOAT) > : > > " - If you require exact storage and calculations (such as for monetary > amounts), use the numeric type instead." > > > So if you decide to use floats after this warning you are on your own. > > > -- > Milen A. Radev Well, actually the manual is not quite clear on this one. It says quite clearly that very very small values approaching zero and very very large values will be problematic. But I am not calculating the distance to the moon. I need values to be accurate upto the 6th decimal place, and was wondering if people use floating point types for this sort of thing. Thanks, Radhika