In trying to answer an SO question I ran across this:
Postgres version 14.5
select 10^(-1 * 18);
?column?
----------
1e-18
select 10^(-1 * 18::numeric);
?column?
--------------------
0.0000000000000000
Same for power:
select power(10, -18);
power
-------
1e-18
(1 row)
select power(10, -18::numeric);
power
--------------------
0.0000000000000000
Why is the cast throwing off the result?
--
Adrian Klaver
adrian.klaver@aklaver.com