From 72b40867112e657c9224c86d1f9b07cc21e2069f Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 20 Mar 2000 05:19:11 +0000 Subject: [PATCH] Convert float8 regress test to use exp() and ln() instead of ':' and ';' operators. --- src/test/regress/expected/float8-exp-three-digits.out | 8 ++++---- src/test/regress/expected/float8-fp-exception.out | 8 ++++---- src/test/regress/expected/float8.out | 8 ++++---- src/test/regress/sql/float8.sql | 8 ++++---- 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 9e87bcc204..a47646cd52 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 68ba663250..30accd5873 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 d4679d663a..6449e6e217 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 e3bbb9d21c..8314f5cac9 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; -- 2.11.0