Re: Possible rounding error of large float values?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Possible rounding error of large float values?
Дата
Msg-id 20040824183612.M67501@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Re: Possible rounding error of large float values?  ("Iain" <iain@mst.co.jp>)
Список pgsql-sql
On Wed, 25 Aug 2004, Iain wrote:

>
> # select 9223372036854775807 = 9223372036854775807::float;
>  ?column?
> ----------
>  t
> (1 row)

> This and the fact that it's still possible to find the row using the
> original value would seem to indicate that the rounding is just a display
> artifact..

I don't think that's true since the number ending in 807 is equal to a
version ending in 808.

sszabo=# select 9223372036854775807 = 9223372036854775808::float;?column?
----------t
(1 row)

(In this next one I'm casting both because I want to choose the types of
both literals)

sszabo=#  select 9223372036854775807::float =
9223372036854775808::numeric;?column?
----------t
(1 row)




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

Предыдущее
От: "Iain"
Дата:
Сообщение: Re: Possible rounding error of large float values?
Следующее
От: "Iain"
Дата:
Сообщение: Re: Possible rounding error of large float values?