From: Tim Ellis <Tim.Ellis@gamet.com>
To: pgsql-admin@postgresql.org
Subject: Re: Precision when substracting two values with SQL
Date: Mon, 12 Aug 2002 13:24:07 -0700
Message-ID: <20020812132407.41c1b314.Tim.Ellis@gamet.com> (raw)
In-Reply-To: <3D58132C.6040303@maxiconsumo.com>
References: <3D58132C.6040303@maxiconsumo.com>
> 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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: Tim.Ellis@gamet.com
Subject: Re: Precision when substracting two values with SQL
In-Reply-To: <20020812132407.41c1b314.Tim.Ellis@gamet.com>
References: <3D58132C.6040303@maxiconsumo.com> <20020812132407.41c1b314.Tim.Ellis@gamet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox