From: Mike Mascari <mascarm@mascari.com>
To: aspire420@hotpop.com
Cc: pgsql-hackers@postgresql.org
Subject: Re: IEEE 754
Date: Mon, 29 Dec 2003 14:27:46 -0500
Message-ID: <3FF08032.4050403@mascari.com> (raw)
In-Reply-To: <3FF06449.7080208@sancharnet.in>
References: <3FF06449.7080208@sancharnet.in>
Sai Hertz And Control Systems wrote:
> Dear all ,
>
> I would like to share my concerns about the IEEE 754 specification and
> floating point handling by PostgreSQL .
>
> Also I would like to learn how professional users of PostgreSQL work
> with rounding of monetary terms .
>
> If you would like to know whats IEEE 754 read this
> http://docs.sun.com/source/806-3568/ncg_goldberg.html
No sane human being would use floating point for monetary values.
NUMERIC is an arbitrary precision type capable of effectively limitless
scale and precision, although it is currently defined as having a limit
of 1000:
#define NUMERIC_MAX_PRECISION 1000
As far as rounding is concerned, it depends on the application. For
example, in the United States at least, each state has devised their own
rounding rules with respect to sales and use taxes. For a look at how
very bad sausage is made:
http://www.ecommercetax.com/official_docs/SSTP%20-%20Rounding.pdf
Mike Mascari
mascarm@mascari.com
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: mascarm@mascari.com, aspire420@hotpop.com, pgsql-hackers@postgresql.org
Subject: Re: IEEE 754
In-Reply-To: <3FF08032.4050403@mascari.com>
References: <3FF06449.7080208@sancharnet.in> <3FF08032.4050403@mascari.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