ERROR: value out of range: underflow in numeric log calculation
От | Gallacher Neil |
---|---|
Тема | ERROR: value out of range: underflow in numeric log calculation |
Дата | |
Msg-id | CWLP265MB5906D3545378C97AADA62BE3DEBBA@CWLP265MB5906.GBRP265.PROD.OUTLOOK.COM обсуждение исходный текст |
Ответы |
Re: ERROR: value out of range: underflow in numeric log calculation
|
Список | pgsql-bugs |
Hi,
When executing log calculations (example below):
SELECT 1.0 * exp(-1.0 *(ln(2) * (1695993520/86400.0)) / 0.04) AS result_test;
The following error occurs.
ERROR: value out of range: underflow
I can find no way around this other than to wrap the calculation in a function with
exception when numeric_value_out_of_range then return 0;
However performance is impacted when performing calculations on multiple rows with a function call.
I can however understand that an individual might wish to know that the result of a calculation cannot be represented by the system due to its small value however I don’t believe it should be the default behaviour.
Thank you,
Neil Gallacher
Analyst/Programmer
В списке pgsql-bugs по дате отправления: