http://bugzilla.spamassassin.org/show_bug.cgi?id=4117





------- Additional Comments From [EMAIL PROTECTED]  2005-02-03 20:48 -------
Subject: Re:  Stars don't match the score

> Isn't this the standard "FAQ" question?

Yes it is.

But in this case, the reporter shows four rule hits, each shown to one
decimal point, which add up to a score of 10.0-1.0=9.0.  The actual scores
for those rules can be looked up in the cf files, but I'd be quite surprised
if any combination of 4 items accurate to 0.1 can be made to add up to a
value that is off by more than 0.4, assuming normal arithmetic rules are in
use.

What *could* be the case here is that they add up to 8.9999, or perhaps even
8.95, but presumably NOT to 8.9499999.  The first two would round (under the
normal rules of arithmetic, and possibly even under the rules of Perl
arithmetic) to 9.0.  The third item would round under the normal rules of
arithmetic to 8.9, and thus would NOT show up as 9.0.

Thus, assuming normal arithmetic is in use here, the visible score of 9.0
must be correct to within abs(0.05) or less.

The obvious conclusion here is that the stars are being generated by a
simple truncation of the score to an integer, NOT by rounding to an integer,
as the displayed score is.  By the same rounding rules being used to display
that 9.0 score, there should have been 9 stars.  Only by failing to round,
so that a value of for instance 8.999999999999999999 will be truncated to
8.0000000, can you manage to get 8 stars from those numbers.

I think that due to the fact that the total score is being displayed to a
supposed precision of one tenth of a point, I would have to assume that the
stars should also be generated as best possible to a similar accuracy.
Since a partial star can't be displayed, this means that the conversion from
a score to a number of stars should be done by rounding, not by truncation.
Adding 0.5 to the score before integerizing will produce the expected (and
also correct) results.

Alternately, the score display should be reduced to an integer, so that the
standard FAQ excuse of truncation can be valid.





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to