num and denom were the result of a number of mathematical operations. However the initial operands were real numbers selected from a database query. So when I said that the numbers were real numbers when they left the server, I meant that the queried numbers were real numbers in the database server.
Here's the code that set num and denom:
To set any of the variables ending with the suffix "sum" I began with a statment such as this:
Perhaps I should have initialized it to the value "0.0".
Then there is a loop where I am accumulating the sum from a query, like this:
In the above snippet, the numbers in row and row should be real numbers.
In most cases the ratio I am seeking works out, but in those cases where the numerator and denominator coincidentally do not have a fractional part, I get integer division, and the ratio is misleadingly reported to be zero. [ December 17, 2008: Message edited by: deb platt ]