> On 13/10/2022 19:16 CEST Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Erik Wienhold <ewie@ewie.name> writes:
> > On 13/10/2022 18:20 CEST Adrian Klaver <adrian.klaver@aklaver.com> wrote:
> >> select power(10, -18::numeric);
> >> power
> >> --------------------
> >> 0.0000000000000000
> >>
> >> Why is the cast throwing off the result?
>
> > Calling power(numeric, numeric) is what I expect in that case instead of
> > downcasting the exponent argument to double precision, thus losing precision.
>
> An inexact result isn't surprising, but it shouldn't be *that* inexact.
Ah, now I see the problem. I saw a bunch of zeros but not that it's *all*
zeros. Nevermind.
--
Erik