summaryrefslogtreecommitdiff
path: root/src/backend/commands/analyze.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-10-25 20:37:30 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-10-25 20:37:30 +0000
commit22d9e912199dc2436d7a24bbfb82bcd768973020 (patch)
tree7110843fd6ea801ae01f926279767b63c3211a35 /src/backend/commands/analyze.c
parent73c5ad93376ec337e115ba565a4d0745fba82ef2 (diff)
Fix a couple of places where lack of parenthesization of a cast
causes pgindent to make weird formatting decisions. Easiest fix seems to be to put in the extra parens...
Diffstat (limited to 'src/backend/commands/analyze.c')
-rw-r--r--src/backend/commands/analyze.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index 41c863a5ba6..085032cd7ac 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.23 2001/10/25 05:49:23 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.24 2001/10/25 20:37:30 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1244,8 +1244,7 @@ compute_scalar_stats(VacAttrStats *stats,
{
int tupno = values[i].tupno;
- corr_xysum += (double) i *(double) tupno;
-
+ corr_xysum += ((double) i) * ((double) tupno);
dups_cnt++;
if (tupnoLink[tupno] == tupno)
{
@@ -1519,9 +1518,10 @@ compute_scalar_stats(VacAttrStats *stats,
* (values_cnt-1)*values_cnt*(2*values_cnt-1) / 6.
*----------
*/
- corr_xsum = (double) (values_cnt - 1) * (double) values_cnt / 2.0;
- corr_x2sum = (double) (values_cnt - 1) * (double) values_cnt *
- (double) (2 * values_cnt - 1) / 6.0;
+ corr_xsum = ((double) (values_cnt - 1)) *
+ ((double) values_cnt) / 2.0;
+ corr_x2sum = ((double) (values_cnt - 1)) *
+ ((double) values_cnt) * (double) (2 * values_cnt - 1) / 6.0;
/* And the correlation coefficient reduces to */
corrs[0] = (values_cnt * corr_xysum - corr_xsum * corr_xsum) /