Re: IEEE 754

Поиск
Список
Период
Сортировка
От Mike Mascari
Тема Re: IEEE 754
Дата
Msg-id 3FF08032.4050403@mascari.com
обсуждение исходный текст
Ответ на IEEE 754  (Sai Hertz And Control Systems <sank89@sancharnet.in>)
Список 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@mascari.com




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Sai Hertz And Control Systems
Дата:
Сообщение: IEEE 754
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: IEEE 754