From: Dean Rasheed <dean.a.rasheed@gmail.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add support for the error functions erf() and erfc().
Date: Tue, 14 Mar 2023 09:21:36 +0000
Message-ID: <E1pc0qe-003TXB-B6@gemulon.postgresql.org> (raw)
Add support for the error functions erf() and erfc().
Expose the standard error functions as SQL-callable functions. These
are expected to be useful to people working with normal distributions,
and we use them here to test the distribution from random_normal().
Since these functions are defined in the POSIX and C99 standards, they
should in theory be available on all supported platforms. If that
turns out not to be the case, more work will be needed.
On all platforms tested so far, using extra_float_digits = -1 in the
regression tests is sufficient to allow for variations between
implementations. However, past experience has shown that there are
almost certainly going to be additional unexpected portability issues,
so these tests may well need further adjustments, based on the
buildfarm results.
Dean Rasheed, reviewed by Nathan Bossart and Thomas Munro.
Discussion: https://postgr.es/m/CAEZATCXv5fi7+Vu-POiyai+ucF95+YMcCMafxV+eZuN1B-=MkQ@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/d5d574146d71c362852748c82ba8b9c873f5bf24
Modified Files
--------------
doc/src/sgml/func.sgml | 35 +++++++++++++++++++++++++++
src/backend/utils/adt/float.c | 47 ++++++++++++++++++++++++++++++++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 7 ++++++
src/test/regress/expected/float8.out | 39 ++++++++++++++++++++++++++++++
src/test/regress/expected/random.out | 32 ++++++++++++++++++++++++
src/test/regress/sql/float8.sql | 14 +++++++++++
src/test/regress/sql/random.sql | 30 +++++++++++++++++++++++
8 files changed, 205 insertions(+), 1 deletion(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: dean.a.rasheed@gmail.com, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add support for the error functions erf() and erfc().
In-Reply-To: <E1pc0qe-003TXB-B6@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox