From: | Nikola Milutinovic <Nikola(dot)Milutinovic(at)ev(dot)co(dot)yu> |
---|---|
To: | PgSQL General <pgsql-general(at)postgresql(dot)org>, PgSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: PgSQL 7.4.2 - NaN on Tru64 UNIX |
Date: | 2004-05-17 07:00:39 |
Message-ID: | 40A86317.3070805@ev.co.yu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers pgsql-patches |
Nikola Milutinovic wrote:
> + #define NAN DBL_INFINITY
>
> The compilation has went smoothly, I'll try to run regression tests.
> Will let you know if something fails.
Hate to reply to myself, but here goes.
With NAN defined as "DBL_INFINITY" I get 3 failed regression test, most
notably "float8" test.
With NAN defined as "DBL_QNAN" (double float Quiet NaN) I get just one,
"float8".
With NAN defined as "DBL_SNAN" (double float Signalling NaN) I get one
error, "float8".
The "problem" is the same in all three cases, an expression that is
supposed to cause overflow, does so, but the output error text is
slightly different. Here is the DIFF file:
*** ./expected/float8.out Thu Sep 25 08:58:06 2003
--- ./results/float8.out Mon May 17 08:37:51 2004
***************
*** 247,253 ****
SET f1 = FLOAT8_TBL.f1 * '-1'
WHERE FLOAT8_TBL.f1 > '0.0';
SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f;
! ERROR: type "double precision" value out of range: overflow
SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f;
ERROR: result is out of range
SELECT '' AS bad, ln(f.f1) from FLOAT8_TBL f where f.f1 = '0.0' ;
--- 247,254 ----
SET f1 = FLOAT8_TBL.f1 * '-1'
WHERE FLOAT8_TBL.f1 > '0.0';
SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f;
! ERROR: floating-point exception
! DETAIL: An invalid floating-point operation was signaled. This
probably means an out-of-range result or an invalid operation, suc
h as division by zero.
SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f;
ERROR: result is out of range
SELECT '' AS bad, ln(f.f1) from FLOAT8_TBL f where f.f1 = '0.0' ;
***************
*** 270,276 ****
-- test for over- and underflow
INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');
! ERROR: "10e400" is out of range for type double precision
INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');
ERROR: "-10e400" is out of range for type double precision
INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');
--- 271,277 ----
-- test for over- and underflow
INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');
! ERROR: invalid input syntax for type double precision: "10e400"
INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');
ERROR: "-10e400" is out of range for type double precision
INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');
======================================================================
Any comments?
Nix.
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno BAGUETTE | 2004-05-17 07:32:49 | SQL norm views to describes tables (and probably some other things) of a database ? |
Previous Message | Greg Stark | 2004-05-17 06:39:52 | Re: fsync = true beneficial on ext3? |
From | Date | Subject | |
---|---|---|---|
Next Message | Hans-Jürgen Schönig | 2004-05-17 07:11:20 | Re: Call for 7.5 feature completion |
Previous Message | James William Pye | 2004-05-17 06:58:37 | Clean-up callbacks for non-SR functions |
From | Date | Subject | |
---|---|---|---|
Next Message | Fabien COELHO | 2004-05-17 07:33:31 | Re: new aggregate functions v1 |
Previous Message | Потеряев =?koi8-r?b?IOku5S4=?= | 2004-05-17 06:34:36 | PITR Phase 1 - partial backport to 7.3.4, 7.3.5 |