Re: Proposal for resolving casting issues

Поиск
Список
Период
Сортировка
От Ross J. Reedstrom
Тема Re: Proposal for resolving casting issues
Дата
Msg-id 20020919160539.GA18024@rice.edu
обсуждение исходный текст
Ответ на Re: Proposal for resolving casting issues  ("Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>)
Список pgsql-hackers
On Thu, Sep 19, 2002 at 06:00:37PM +0200, Zeugswetter Andreas SB SD wrote:
> 
> What if he must display 9 digits and says the result is approximately 2.45678932
> would that be worse than 2.46000000 ? 

Yup. Trailing zeros are not significant. That's why scientific notation is nice:
you don't fill in all those insignificant placeholders.

> 
> 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. 

That's right. And correct, as well.

Ross


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

Предыдущее
От: "Zeugswetter Andreas SB SD"
Дата:
Сообщение: Re: Proposal for resolving casting issues
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] killing process question