From: | Keith Parks <emkxp01(at)mtcc(dot)demon(dot)co(dot)uk> |
---|---|
To: | hackers(at)postgresql(dot)org |
Subject: | Floating point exceptions. |
Date: | 1998-01-07 16:11:09 |
Message-ID: | 199801071611.QAA27856@mtcc.demon.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi All,
I suspect this is an O/S or platform problem but can anyone offer any
suggestions as to how I might locate the cause.
DROP TABLE FLOAT8_TBL;
DROP
CREATE TABLE FLOAT8_TBL(f1 float8);
CREATE
INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-200');
INSERT 277993 1
SELECT '' AS bad, : (f.f1) from FLOAT8_TBL f;
ABORT: floating point exception! The last floating point operation either
exceeded legal ranges or was a divide by zero
The ABORT message comes from tcop.c when we are hit by a FPE signal by
the operating system.
.....
Here's some additional tests that seem to show the threshold.
postgres=> CREATE TABLE FLOAT8_TBL(f1 float8);
CREATE
postgres=> INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-150');
INSERT 278057 1
postgres=> SELECT '' AS bad, : (f.f1) from FLOAT8_TBL f;
bad|?column?
---+--------
| 1
(1 row)
postgres=> INSERT INTO FLOAT8_TBL(f1) VALUES ('1.2345678901234e-151');
INSERT 278058 1
postgres=> SELECT '' AS bad, : (f.f1) from FLOAT8_TBL f;
ABORT: floating point exception! The last floating point operation either
exceeded legal ranges or was a divide by zero
Keith.
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1998-01-07 17:18:40 | Re: [HACKERS] database size |
Previous Message | Darren King | 1998-01-07 15:14:19 | Linux/Alpha's s_lock.c and other ports... |