Обсуждение: BUG #4603: float4 error

Поиск
Список
Период
Сортировка

BUG #4603: float4 error

От
"Stefan Hoffmann"
Дата:
The following bug has been logged online:

Bug reference:      4603
Logged by:          Stefan Hoffmann
Email address:      hoffst@maxinf.de
PostgreSQL version: 7.4
Operating system:   ubuntu linux server
Description:        float4 error
Details:

some specific values such as 20048223 or -25771373 can't be stored in float4
. they are replaced by 20048224 and
-25771372 when inserted or updated in float4 .
is this a problem of 7.4 or caused by "inexact" float4 ?

Re: BUG #4603: float4 error

От
Tom Lane
Дата:
"Stefan Hoffmann" <hoffst@maxinf.de> writes:
> some specific values such as 20048223 or -25771373 can't be stored in float4
> . they are replaced by 20048224 and
> -25771372 when inserted or updated in float4 .
> is this a problem of 7.4 or caused by "inexact" float4 ?

The latter.  On most machines float4 is only good for about six
significant digits, and you're expecting eight ...

            regards, tom lane