Re: [HACKERS] Floating point error

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: [HACKERS] Floating point error
Дата
Msg-id 1362491966.28424.YahooMailNeo@web162904.mail.bf1.yahoo.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Floating point error  (Daniel Farina <daniel@heroku.com>)
Ответы Re: [HACKERS] Floating point error  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список pgsql-general
Daniel Farina <daniel@heroku.com> wrote:

> This kind of change may have many practical problems that may
> make it un-pragmatic to alter at this time (considering the
> workaround is to set the extra float digits), but I can't quite
> grasp the rationale for "well, the only program that cares about
> the most precision available is pg_dump".  It seems like most
> programs would care just as much.

Something to keep in mind is that when you store 0.01 into a double
precision column, the precise value stored, when written in
decimal, is:

0.01000000000000000020816681711721685132943093776702880859375

Of course, some values can't be precisely written in decimal with
so few digits.

--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Alexander Farber
Дата:
Сообщение: Re: Finding matching words in a word game
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: 9.2 timestamp function syntax error