diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-12-07 15:28:14 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-12-07 15:28:14 +0000 |
commit | 426b07ee3b9b307207db3f19bac84e4fb30160fb (patch) | |
tree | 4d5a455d491c00dddada1847b5c48c941e69a329 | |
parent | 67933b3f1940050b52ae3568c167d570f5432099 (diff) | |
download | ATCD-426b07ee3b9b307207db3f19bac84e4fb30160fb.tar.gz |
(std_dev): added comments to not reformat some code. It compiles with
the Diab compiler for pSoS the way it is.
-rw-r--r-- | ace/Stats.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/ace/Stats.cpp b/ace/Stats.cpp index 14421744241..1d57631f554 100644 --- a/ace/Stats.cpp +++ b/ace/Stats.cpp @@ -137,16 +137,22 @@ ACE_Stats::std_dev (ACE_Stats_Value &std_dev, // Scale up by field width so that we don't lose the // precision of the mean. Carefully . . . const ACE_UINT64 product (*sample * field); + ACE_UINT64 difference; - if (product >= mean_scaled) - { - difference = product - mean_scaled; - } - else - { - difference = mean_scaled - product; - } - // Do the squaring using 64-bit arithmetic. + // NOTE: please do not reformat this code! It // + // works with the Diab compiler the way it is! // + if (product >= mean_scaled) // + { // + difference = product - mean_scaled; // + } // + else // + { // + difference = mean_scaled - product; // + } // + // NOTE: please do not reformat this code! It // + // works with the Diab compiler the way it is! // + + // Square using 64-bit arithmetic. sum_of_squares += difference * ACE_U64_TO_U32 (difference); i.advance (); |