Re: Precision problems with float8

Поиск
Список
Период
Сортировка
От Gabriel Fernandez
Тема Re: Precision problems with float8
Дата
Msg-id 3BF53F74.17720FEC@unica.edu
обсуждение исходный текст
Ответ на Precision problems with float8  (Gabriel Fernandez <gabi@unica.edu>)
Ответы Re: Precision problems with float8
Список pgsql-general
Hi Stephan,

Here I send a short script to show the problem when using the float8 in
additions or substractions, etc.

Just execute it and look at the output. It just creates a table
('prova') which has the 'amount' column with values with only two
decimal places, but the sum(amount) has 10 decimal places.

Just look at the output of the script and you'll see:
In the set of data I send to you, you can see that the 10th decimal
appears just when we add the last amount. So when it calculates 84193.26
+ 4346.44 the result is 88539.7000000001, given that the 84193.26  is
the sum(amount) just before adding the last amount.

I hope this will be enough to show the problem.

Thanks,

Gabi :-)

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Poor performance on SCSI machines, good on IDE?
Следующее
От: "K. Ari Krupnikov"
Дата:
Сообщение: table names