Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E7800475E17 for ; Mon, 12 Aug 2002 16:25:19 -0400 (EDT) Received: from linuxmail.lgsinc.com (unknown [12.22.4.163]) by postgresql.org (Postfix) with ESMTP id 0A077475DF9 for ; Mon, 12 Aug 2002 16:25:19 -0400 (EDT) Received: from timetop ([10.13.15.254]) by linuxmail.lgsinc.com (8.11.6/8.8.7) with SMTP id g7CKPk318994 for ; Mon, 12 Aug 2002 13:25:46 -0700 Date: Mon, 12 Aug 2002 13:24:07 -0700 From: Tim Ellis To: pgsql-admin@postgresql.org Subject: Re: Precision when substracting two values with SQL Message-Id: <20020812132407.41c1b314.Tim.Ellis@gamet.com> In-Reply-To: <3D58132C.6040303@maxiconsumo.com> References: <3D58132C.6040303@maxiconsumo.com> Organization: Gamet X-Mailer: Sylpheed version 0.7.4 (GTK+ 1.2.10; i586-mandrake-linux-gnu) WerdupHomey: 3.14159265358979323 Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/121 X-Sequence-Number: 5236 > ciudadela=# select 0.2-0.2; > 0 > ciudadela=# select 0.2-0.21; > -0.00999999999999998 > ciudadela=# select 0.21-0.22; > -0.01 I also get this on my Postgres 7.2.1, both Linux and Solaris. -- Tim Ellis Senior Database Architect Gamet, Inc.