Numeric x^y for negative x

Поиск
Список
Период
Сортировка
От Dean Rasheed
Тема Numeric x^y for negative x
Дата
Msg-id CAEZATCW6Dvq7+3wN3tt5jLj-FyOcUgT5xNoOqce5=6Su0bCR0w@mail.gmail.com
обсуждение исходный текст
Ответы Re: Numeric x^y for negative x  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Список pgsql-hackers
Numeric x^y is supported for x < 0 if y is an integer, but this
currently fails if y is outside the range of an int32:

SELECT (-1.0) ^ 2147483647;
      ?column?
---------------------
 -1.0000000000000000
(1 row)

SELECT (-1.0) ^ 2147483648;
ERROR:  cannot take logarithm of a negative number

because only the power_var_int() code path in power_var() handles
negative bases correctly. Attached is a patch to fix that.

Regards,
Dean

Вложения

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options
Следующее
От: John Naylor
Дата:
Сообщение: Re: speed up verifying UTF-8