Re: BUG #6217: to_char() gives incorrect output for very small float values

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: BUG #6217: to_char() gives incorrect output for very small float values
Дата
Msg-id 4E78899D020000250004140B@gw.wicourts.gov
обсуждение исходный текст
Ответ на BUG #6217: to_char() gives incorrect output for very small float values  ("Chris Gernon" <kabigon@gmail.com>)
Ответы Re: BUG #6217: to_char() gives incorrect output for very small float values  (Christopher Gernon <kabigon@gmail.com>)
Список pgsql-bugs
"Chris Gernon" <kabigon@gmail.com> wrote:

> The to_char() function gives incorrect output for float values
> whose decimal expansion has several digits (more than somewhere
> around 14-15) after the decimal point.

These are approximate data types.  On what basis do you think the
values returned in your examples are wrong?  The demonstrated
results don't surprise me, given that they match to about the limits
of the approximate data type involved.  It also wouldn't surprise me
to see slightly different results on different architectures or
operating systems.  If you want exact values, you should use a type
which supports that, like numeric.

-Kevin

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

Предыдущее
От: "Chris Gernon"
Дата:
Сообщение: BUG #6217: to_char() gives incorrect output for very small float values
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #6217: to_char() gives incorrect output for very small float values