Re: Floating point error

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: Floating point error
Дата
Msg-id 512ACA5B.6040506@hogranch.com
обсуждение исходный текст
Ответ на Floating point error  (Tom Duffey <tduffey@trillitech.com>)
Ответы Re: Floating point error  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
On 2/24/2013 6:13 PM, Tom Duffey wrote:
> - The Java app on production shows "10.3884573" while the test app shows "10.3885"

'real' is single precision, which is only about 6 digits of decimal
accuracy.   if your java variables were double precision, you probably
should have used double in postgres too.

0.1 decimal is a repeating fraction in binary.



--
john r pierce                                      37N 122W
somewhere on the middle of the left coast

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

Предыдущее
От: Tom Duffey
Дата:
Сообщение: Floating point error
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Floating point error