aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-03-20 05:19:11 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-03-20 05:19:11 +0000
commit72b40867112e657c9224c86d1f9b07cc21e2069f (patch)
tree127f1b5a36f62321ef0fd8ec19a725c439303c3f /src
parent7f116a6b83105bbbf1d18d535f78731a449ecd36 (diff)
downloadpostgresql-72b40867112e657c9224c86d1f9b07cc21e2069f.tar.gz
postgresql-72b40867112e657c9224c86d1f9b07cc21e2069f.zip
Convert float8 regress test to use exp() and ln() instead of ':' and
';' operators.
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/expected/float8-exp-three-digits.out8
-rw-r--r--src/test/regress/expected/float8-fp-exception.out8
-rw-r--r--src/test/regress/expected/float8.out8
-rw-r--r--src/test/regress/sql/float8.sql8
4 files changed, 16 insertions, 16 deletions
diff --git a/src/test/regress/expected/float8-exp-three-digits.out b/src/test/regress/expected/float8-exp-three-digits.out
index 9e87bcc2041..a47646cd52b 100644
--- a/src/test/regress/expected/float8-exp-three-digits.out
+++ b/src/test/regress/expected/float8-exp-three-digits.out
@@ -161,7 +161,7 @@ SELECT '' AS three, f.f1, |/f.f1 AS sqrt_f1
(3 rows)
-- take exp of ln(f.f1)
-SELECT '' AS three, f.f1, : ( ; f.f1) AS exp_ln_f1
+SELECT '' AS three, f.f1, exp(ln(f.f1)) AS exp_ln_f1
FROM FLOAT8_TBL f
WHERE f.f1 > '0.0';
three | f1 | exp_ln_f1
@@ -199,11 +199,11 @@ SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f;
ERROR: Bad float8 input format -- overflow
SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f;
ERROR: pow() result is out of range
-SELECT '' AS bad, (; (f.f1)) from FLOAT8_TBL f where f.f1 = '0.0' ;
+SELECT '' AS bad, ln(f.f1) from FLOAT8_TBL f where f.f1 = '0.0' ;
ERROR: can't take log of zero
-SELECT '' AS bad, (; (f.f1)) from FLOAT8_TBL f where f.f1 < '0.0' ;
+SELECT '' AS bad, ln(f.f1) from FLOAT8_TBL f where f.f1 < '0.0' ;
ERROR: can't take log of a negative number
-SELECT '' AS bad, : (f.f1) from FLOAT8_TBL f;
+SELECT '' AS bad, exp(f.f1) from FLOAT8_TBL f;
ERROR: exp() result is out of range
SELECT '' AS bad, f.f1 / '0.0' from FLOAT8_TBL f;
ERROR: float8div: divide by zero error
diff --git a/src/test/regress/expected/float8-fp-exception.out b/src/test/regress/expected/float8-fp-exception.out
index 68ba6632500..30accd58733 100644
--- a/src/test/regress/expected/float8-fp-exception.out
+++ b/src/test/regress/expected/float8-fp-exception.out
@@ -161,7 +161,7 @@ SELECT '' AS three, f.f1, |/f.f1 AS sqrt_f1
(3 rows)
-- take exp of ln(f.f1)
-SELECT '' AS three, f.f1, : ( ; f.f1) AS exp_ln_f1
+SELECT '' AS three, f.f1, exp(ln(f.f1)) AS exp_ln_f1
FROM FLOAT8_TBL f
WHERE f.f1 > '0.0';
three | f1 | exp_ln_f1
@@ -199,11 +199,11 @@ SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f;
ERROR: floating point exception! The last floating point operation either exceeded legal ranges or was a divide by zero
SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f;
ERROR: pow() result is out of range
-SELECT '' AS bad, (; (f.f1)) from FLOAT8_TBL f where f.f1 = '0.0' ;
+SELECT '' AS bad, ln(f.f1) from FLOAT8_TBL f where f.f1 = '0.0' ;
ERROR: can't take log of zero
-SELECT '' AS bad, (; (f.f1)) from FLOAT8_TBL f where f.f1 < '0.0' ;
+SELECT '' AS bad, ln(f.f1) from FLOAT8_TBL f where f.f1 < '0.0' ;
ERROR: can't take log of a negative number
-SELECT '' AS bad, : (f.f1) from FLOAT8_TBL f;
+SELECT '' AS bad, exp(f.f1) from FLOAT8_TBL f;
ERROR: exp() result is out of range
SELECT '' AS bad, f.f1 / '0.0' from FLOAT8_TBL f;
ERROR: float8div: divide by zero error
diff --git a/src/test/regress/expected/float8.out b/src/test/regress/expected/float8.out
index d4679d663ae..6449e6e2176 100644
--- a/src/test/regress/expected/float8.out
+++ b/src/test/regress/expected/float8.out
@@ -173,7 +173,7 @@ SELECT '' AS three, f.f1, |/f.f1 AS sqrt_f1
(3 rows)
-- take exp of ln(f.f1)
-SELECT '' AS three, f.f1, : ( ; f.f1) AS exp_ln_f1
+SELECT '' AS three, f.f1, exp(ln(f.f1)) AS exp_ln_f1
FROM FLOAT8_TBL f
WHERE f.f1 > '0.0';
three | f1 | exp_ln_f1
@@ -217,11 +217,11 @@ SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f;
ERROR: Bad float8 input format -- overflow
SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f;
ERROR: pow() result is out of range
-SELECT '' AS bad, (; (f.f1)) from FLOAT8_TBL f where f.f1 = '0.0' ;
+SELECT '' AS bad, ln(f.f1) from FLOAT8_TBL f where f.f1 = '0.0' ;
ERROR: can't take log of zero
-SELECT '' AS bad, (; (f.f1)) from FLOAT8_TBL f where f.f1 < '0.0' ;
+SELECT '' AS bad, ln(f.f1) from FLOAT8_TBL f where f.f1 < '0.0' ;
ERROR: can't take log of a negative number
-SELECT '' AS bad, : (f.f1) from FLOAT8_TBL f;
+SELECT '' AS bad, exp(f.f1) from FLOAT8_TBL f;
ERROR: exp() result is out of range
SELECT '' AS bad, f.f1 / '0.0' from FLOAT8_TBL f;
ERROR: float8div: divide by zero error
diff --git a/src/test/regress/sql/float8.sql b/src/test/regress/sql/float8.sql
index e3bbb9d21cb..8314f5cac9d 100644
--- a/src/test/regress/sql/float8.sql
+++ b/src/test/regress/sql/float8.sql
@@ -70,7 +70,7 @@ SELECT '' AS three, f.f1, |/f.f1 AS sqrt_f1
WHERE f.f1 > '0.0';
-- take exp of ln(f.f1)
-SELECT '' AS three, f.f1, : ( ; f.f1) AS exp_ln_f1
+SELECT '' AS three, f.f1, exp(ln(f.f1)) AS exp_ln_f1
FROM FLOAT8_TBL f
WHERE f.f1 > '0.0';
@@ -90,11 +90,11 @@ SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f;
SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f;
-SELECT '' AS bad, (; (f.f1)) from FLOAT8_TBL f where f.f1 = '0.0' ;
+SELECT '' AS bad, ln(f.f1) from FLOAT8_TBL f where f.f1 = '0.0' ;
-SELECT '' AS bad, (; (f.f1)) from FLOAT8_TBL f where f.f1 < '0.0' ;
+SELECT '' AS bad, ln(f.f1) from FLOAT8_TBL f where f.f1 < '0.0' ;
-SELECT '' AS bad, : (f.f1) from FLOAT8_TBL f;
+SELECT '' AS bad, exp(f.f1) from FLOAT8_TBL f;
SELECT '' AS bad, f.f1 / '0.0' from FLOAT8_TBL f;