Re: IEEE 754

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: aspire420(at)hotpop(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: IEEE 754
Date: 2003-12-29 19:27:46
Message-ID: 3FF08032.4050403@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-hackers

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(at)mascari(dot)com

In response to

  • IEEE 754 at 2003-12-29 17:28:41 from Sai Hertz And Control Systems

Browse pgsql-admin by date

  From Date Subject
Next Message Greg Spiegelberg 2003-12-29 19:48:53 Re: UNIX File buffering disable?
Previous Message Jan Wieck 2003-12-29 19:13:45 Re: [HACKERS] IEEE 754

Browse pgsql-hackers by date

  From Date Subject
Next Message Keith C. Perry 2003-12-29 19:31:43 Re: [GENERAL] Is my MySQL Gaining ?
Previous Message Jan Wieck 2003-12-29 19:13:45 Re: [HACKERS] IEEE 754