Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^
Дата
Msg-id 29579.1210285411@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^  (momjian@postgresql.org (Bruce Momjian))
Ответы Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-committers
momjian@postgresql.org (Bruce Momjian) writes:
> Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^ 0.0
> return 1, rather than error.

This is wrongly described, and the implementation is still not correct
either, because it should throw an error for negative exponents.
Would you please *read* that wikipedia page you keep citing?
http://en.wikipedia.org/wiki/Exponentiation#Powers_of_zero

            regards, tom lane

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pgsql: Have numeric 0 ^ 4.3 return 1, rather than an error, and have 0 ^