Re: Proposal for resolving casting issues

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Proposal for resolving casting issues
Дата
Msg-id 26667.1032452545@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Proposal for resolving casting issues  ("Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>)
Список pgsql-hackers
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
> For above calculation pg will in the future return 0.00000000000000000000 as an
> answer to 1.00000000000001*1000.0-1000.0 when used in my example context, while
> it currently returns 0.000000000010 ... 
> You both are saying, that 0.00000000000000000000 is a better answer. 

Not exactly: we are saying it is not a worse answer.  There's no reason
to prefer one over the other, because they are both within the range
of uncertainty given the inherent uncertainty in the float4 input.

If you want exact results, you should be using exact datatypes.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Memory Errors...
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: SIMILAR TO syntax (Was: Re: The TODO List (Was: Re: O...)