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

Поиск
Список
Период
Сортировка
От Christopher Gernon
Тема Re: BUG #6217: to_char() gives incorrect output for very small float values
Дата
Msg-id CAKwX5KiRDRkWKwvPq5XQy43_LdF+1CR51vzGy9MmbVikmYORew@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #6217: to_char() gives incorrect output for very small float values  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-bugs
On Tue, Sep 20, 2011 at 1:39 PM, Kevin Grittner
<Kevin.Grittner@wicourts.gov> wrote:
> These are approximate data types. =A0On what basis do you think the
> values returned in your examples are wrong? =A0The demonstrated

Because PostgreSQL still has access to all the significant digits:

test1=3D# SELECT f FROM t WHERE id =3D 1;
        f
-----------------
 5.63219288e-032
(1 row)

Since floats are stored with a significand and an exponent, to_char()
should be able to convert 5.6e-32 to text just as easily as it can
convert 5.6e-3. For some reason, it doesn't.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: 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