pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Solaris fails test with float8.
3+ messages / 3 participants
[nested] [flat]

* Solaris fails test with float8.
@ 2014-11-28 15:01 Mats Erik Andersson <bsd@gisladisker.se>
  2014-11-28 15:35 ` Re: Solaris fails test with float8. Tom Lane <tgl@sss.pgh.pa.us>
  2014-11-28 16:40 ` Re: Solaris fails test with float8. John R Pierce <pierce@hogranch.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Mats Erik Andersson @ 2014-11-28 15:01 UTC (permalink / raw)
  To: pgsql-bugs

(Please send me a carbon copy when responding.)

A Solaris system like my OpenIndiana oi_151a9 is failing
a single test case, namely float8, when testing either
of PostgreSQL 9.4beta2, 9.4beta3, and 9.4rc1. I do not
know how properly to interpret the output in expressed
in "regression.diffs", so tell whether I could do some
further modification to produce a better diagnosis.

Best regards,
  Mats Erik Andersson


inline patch 1: ..../postgresql-9.4rc1/src/test/regress/results/float8.out (+9/-1 lines) download inline-1.patch*** ..../postgresql-9.4rc1/src/test/regress/expected/float8.out 2014-11-17 21:54:40.000000000 +0100 --- ..../postgresql-9.4rc1/src/test/regress/results/float8.out 2014-11-27 17:55:17.639864887 +0100 *************** *** 382,388 **** SET f1 = FLOAT8_TBL.f1 * '-1' WHERE FLOAT8_TBL.f1 > '0.0'; SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f; ! ERROR: value out of range: overflow SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f; ERROR: value out of range: overflow SELECT 0 ^ 0 + 0 ^ 1 + 0 ^ 0.0 + 0 ^ 0.5; --- 382,396 ---- SET f1 = FLOAT8_TBL.f1 * '-1' WHERE FLOAT8_TBL.f1 > '0.0'; SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f; ! bad | ?column? ! -----+------------------ ! | 0 ! | -3.484e+201 ! | -1.0043e+203 ! | -Infinity ! | -1.2345678901234 ! (5 rows) ! SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f; ERROR: value out of range: overflow SELECT 0 ^ 0 + 0 ^ 1 + 0 ^ 0.0 + 0 ^ 0.5;
====================================================================== -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs ^ permalink raw reply [nested|flat] 3+ messages in thread

* Re: Solaris fails test with float8.
  2014-11-28 15:01 Solaris fails test with float8. Mats Erik Andersson <bsd@gisladisker.se>
@ 2014-11-28 15:35 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2014-11-28 15:35 UTC (permalink / raw)
  To: Mats Erik Andersson <bsd@gisladisker.se>; +Cc: pgsql-bugs

Mats Erik Andersson <bsd@gisladisker.se> writes:
> (Please send me a carbon copy when responding.)
> A Solaris system like my OpenIndiana oi_151a9 is failing
> a single test case, namely float8, when testing either
> of PostgreSQL 9.4beta2, 9.4beta3, and 9.4rc1. I do not
> know how properly to interpret the output in expressed
> in "regression.diffs", so tell whether I could do some
> further modification to produce a better diagnosis.

It appears that your machine is returning -Infinity,
rather than throwing an error, for the case of
	-1.2345678901234e200 * 1e200
(both inputs being float8 not numeric).

That test has been there since forever, so I'm pretty sure
any previous Postgres release would also fail this test on
such a machine.

Looking a bit closer at float8mul leaves me wondering exactly
what happened, though.  It appears that the result of the
multiplication did not satisfy isinf(), else the CHECKFLOATVAL
macro would've thrown the expected error ... but then why did
float8out print it as "-Infinity"?

The most likely theory seems to go like this: the result of
the multiplication is initially sitting in a wider-than-double
register, which'd be able to represent -1.234e400 without overflow;
the compiler applies an isinf operation to that register and decides
it ain't infinity; but then when float8mul returns, the value has
to be converted to plain double, at which point the hardware changes
it to an IEEE infinity since the value is too large.  If that's what
went down, it's a compiler bug, because the text of the function is
very clear that the multiplication result must be stored into a
double (not long double) variable before isinf() is applied to it.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



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

* Re: Solaris fails test with float8.
  2014-11-28 15:01 Solaris fails test with float8. Mats Erik Andersson <bsd@gisladisker.se>
@ 2014-11-28 16:40 ` John R Pierce <pierce@hogranch.com>
  1 sibling, 0 replies; 3+ messages in thread

From: John R Pierce @ 2014-11-28 16:40 UTC (permalink / raw)
  To: pgsql-bugs

On 11/28/2014 7:01 AM, Mats Erik Andersson wrote:
> A Solaris system like my OpenIndiana oi_151a9

just a note, OpenIndiana is *not* Solaris(tm).  it may be based on a 
fork of 'Solaris Express 11', but its a whole different OS now thats 
gone in its own direction.


-- 
john r pierce                                      37N 122W
somewhere on the middle of the left coast



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



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


end of thread, other threads:[~2014-11-28 16:40 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-11-28 15:01 Solaris fails test with float8. Mats Erik Andersson <bsd@gisladisker.se>
2014-11-28 15:35 ` Tom Lane <tgl@sss.pgh.pa.us>
2014-11-28 16:40 ` John R Pierce <pierce@hogranch.com>

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