pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix power() for large inputs yet more.
3+ messages / 2 participants
[nested] [flat]

Commits from this thread:
  2020-06-16 3a990a1263  Lobotomize test for float -Inf ^ -2, at least for now.
  2020-06-16 400f169373  In dpow(), remove redundant check for whether y is an integer.
* pgsql: Fix power() for large inputs yet more.
@ 2020-06-15 23:10 Tom Lane <tgl@sss.pgh.pa.us>
  2020-06-16 02:23 ` Re: pgsql: Fix power() for large inputs yet more. Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2020-06-15 23:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix power() for large inputs yet more.

Buildfarm results for commit e532b1d57 reveal the error in my thinking
about the unexpected-EDOM case.  I'd supposed this was no longer really
a live issue, but it seems the fix for glibc's bug #3866 is not all that
old, and we still have at least one buildfarm animal (lapwing) with the
bug.  Hence, resurrect essentially the previous logic (but, I hope, less
opaquely presented), and explain what it is we're really doing here.

Also, blindly try to fix fossa's failure by tweaking the logic that
figures out whether y is an odd integer when x is -inf.  This smells
a whole lot like a compiler bug, but I lack access to icc to try to
pin it down.  Maybe doing division instead of multiplication will
dodge the issue.

Discussion: https://postgr.es/m/E1jkU7H-00024V-NZ@gemulon.postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5674eb98762ed41c7f9672a3bc56edf925e9d97d

Modified Files
--------------
src/backend/utils/adt/float.c | 34 +++++++++++++++++++++++-----------
1 file changed, 23 insertions(+), 11 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgsql: Fix power() for large inputs yet more.
  2020-06-15 23:10 pgsql: Fix power() for large inputs yet more. Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-06-16 02:23 ` Michael Paquier <michael@paquier.xyz>
  2020-06-16 02:38   ` Re: pgsql: Fix power() for large inputs yet more. Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Michael Paquier @ 2020-06-16 02:23 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-committers@lists.postgresql.org

On Mon, Jun 15, 2020 at 11:10:43PM +0000, Tom Lane wrote:
> Fix power() for large inputs yet more.
> 
> Buildfarm results for commit e532b1d57 reveal the error in my thinking
> about the unexpected-EDOM case.  I'd supposed this was no longer really
> a live issue, but it seems the fix for glibc's bug #3866 is not all that
> old, and we still have at least one buildfarm animal (lapwing) with the
> bug.  Hence, resurrect essentially the previous logic (but, I hope, less
> opaquely presented), and explain what it is we're really doing here.

fossa seems to still be complaining after that:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fossa&dt=2020-06-16%2000%3A23%3A24
 SELECT power(float8 '-inf', float8 '-2');
  power
 -------
-     0
+    -0
 (1 row)

Thanks,
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgsql: Fix power() for large inputs yet more.
  2020-06-15 23:10 pgsql: Fix power() for large inputs yet more. Tom Lane <tgl@sss.pgh.pa.us>
  2020-06-16 02:23 ` Re: pgsql: Fix power() for large inputs yet more. Michael Paquier <michael@paquier.xyz>
@ 2020-06-16 02:38   ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2020-06-16 02:38 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-committers@lists.postgresql.org

Michael Paquier <michael@paquier.xyz> writes:
> fossa seems to still be complaining after that:

Yeah.  Not sure what to do about that.  It seems to be coming to the
wrong conclusion about whether yisoddinteger, but I can't think of
another way to code that that won't introduce other risks.

Worst case answer would be to remove this test case, or dumb it
down so that it can't distinguish +0 and -0 outputs.  That
seems pretty annoying though, especially if (as I suspect)
every other buildfarm member gets this right.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2020-06-16 02:38 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-06-15 23:10 pgsql: Fix power() for large inputs yet more. Tom Lane <tgl@sss.pgh.pa.us>
2020-06-16 02:23 ` Michael Paquier <michael@paquier.xyz>
2020-06-16 02:38   ` Tom Lane <tgl@sss.pgh.pa.us>

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