Re: Add error functions: erf() and erfc()
Dean Rasheed <dean.a.rasheed@gmail.com>
From: Dean Rasheed <dean.a.rasheed@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-03-08T23:29:12Z
Lists: 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
Commits
-
Add support for the error functions erf() and erfc().
- d5d574146d71 16.0 landed