Re: Strange results when casting string to double

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Strange results when casting string to double
Дата
Msg-id f3575aaf-98a8-6941-7843-ba1a0d78514f@enterprisedb.com
обсуждение исходный текст
Ответ на Strange results when casting string to double  (Carsten Klein <c.klein@datagis.com>)
Ответы Re: Strange results when casting string to double  (Carsten Klein <c.klein@datagis.com>)
Список pgsql-general
On 16.02.22 14:27, Carsten Klein wrote:
> AFAIK, this conversion is done by internal function float8in, which, 
> when called directly, yields the same results:
> 
> SELECT float8in('1.56');
> 
> --> 1.55999999999999   (wrong!)   on one server, and
> --> 1.56               (correct!) on all other servers.

float8in() really just calls the operating system's strtod() function. 
I would test that one directly with a small C program.

It's also possible that different compiler options lead to different 
optimizations.



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

Предыдущее
От: Michael Lewis
Дата:
Сообщение: Re: PostgreSQL's Max Identifier Length in Amazon RDS
Следующее
От: Mladen Gogala
Дата:
Сообщение: Re: 2 phase commit with FDW