pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Rethink how to test the hyperbolic functions.
Date: Wed, 13 Mar 2019 22:14:05 +0000
Message-ID: <E1h4C8T-0007tQ-W2@gemulon.postgresql.org> (raw)

Rethink how to test the hyperbolic functions.

The initial commit tried to test them on trivial cases such as 0,
reasoning that we shouldn't hit any portability issues that way.
The buildfarm immediately proved that hope ill-founded, and anyway
it's not a great testing scheme because it doesn't prove that we're
even calling the right library function for each SQL function.

Instead, let's test them at inputs such as 1 (or something within
the valid range, as needed), so that each function should produce
a different output.

As committed, this is just about certain to show portability
failures, because it's very unlikely that every platform computes
these functions the same as mine down to the last bit.  However,
I want to put it through a buildfarm cycle this way, so that
we can see how big the variations are.  The plan is to add
"set extra_float_digits = -1", or whatever we need in order to
hide the variations; but first we need data.

Discussion: https://postgr.es/m/E1h3nUY-0000sM-Vf@gemulon.postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c6f153dcfebccf7a0d92290037793c656f1caef5

Modified Files
--------------
src/test/regress/expected/float8.out | 50 ++++++++++++++++++------------------
src/test/regress/sql/float8.sql      | 16 ++++++------
2 files changed, 33 insertions(+), 33 deletions(-)



Message-ID: <E1h4C8T-0007tQ-W2@gemulon.postgresql.org>
Permalink:  ../E1h4C8T-0007tQ-W2@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1h4C8T-0007tQ-W2@gemulon.postgresql.org

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Rethink how to test the hyperbolic functions.
  In-Reply-To: <E1h4C8T-0007tQ-W2@gemulon.postgresql.org>
  References: <E1h4C8T-0007tQ-W2@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