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
[EMAIL PROTECTED]



---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to