Re: Add error functions: erf() and erfc() - Mailing list pgsql-hackers

From Dean Rasheed
Subject Re: Add error functions: erf() and erfc()
Date
Msg-id CAEZATCVfLNaq=hoJ=qKN5_swUMzKvTrjTXdDYaRz1GezHn=8Dg@mail.gmail.com
Whole thread Raw
In response to Re: Add error functions: erf() and erfc()  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: Add error functions: erf() and erfc()
List pgsql-hackers
On Wed, 8 Mar 2023 at 20:11, Nathan Bossart <nathandbossart@gmail.com> wrote:
>
> On Mon, Feb 27, 2023 at 12:54:35PM +0000, Dean Rasheed wrote:
> > +     /*
> > +      * For erf, we don't need an errno check because it never overflows.
> > +      */
>
> > +     /*
> > +      * For erfc, we don't need an errno check because it never overflows.
> > +      */
>
> The man pages for these seem to indicate that underflow can occur.  Do we
> need to check for that?
>

No, I don't think so. The docs indicate that if an underflow occurs,
the correct result (after rounding) should be returned, so I think we
should just return that result (as we do for tanh(), for example).

Regards,
Dean



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Add error functions: erf() and erfc()
Next
From: Tomas Vondra
Date:
Subject: Re: lz4 --rm on Ubuntu 18.04 (Add LZ4 compression to pg_dump)