From: Radhika Sambamurti <radhika@88thstreet.com>
To: Milen A. Radev <milen@radev.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: Floating point type to store numbers
Date: Tue, 17 Apr 2007 16:36:20 -0400 (EDT)
Message-ID: <20944.63.118.86.10.1176842180.squirrel@www.88thstreet.com> (raw)
In-Reply-To: <f03636$bat$1@sea.gmane.org>
References: <4838.63.118.86.10.1176836034.squirrel@www.88thstreet.com>
<f03636$bat$1@sea.gmane.org>
> 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
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: radhika@88thstreet.com, milen@radev.net
Subject: Re: Floating point type to store numbers
In-Reply-To: <20944.63.118.86.10.1176842180.squirrel@www.88thstreet.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