Dan wrote:
> Good approach Herb, thanks
> 
> 
> To anyone:
> 
> 1) What is the highest weight value (in number of digits) supported by
> SpamAssassin?
> 
> 2) What is the smallest weigh value (in decimal places) supported by
> SpamAssassin?

In current practice, the range is 1000 to 0.0001. The code that prints results
is heavily biased toward this input range, and also rounds or truncates to the
nearest tenth. I think this is pretty much the widest dynamic range you should
ever have need to use.

However, when it comes down to parsing and internal mathematics, spamassassin is
likely only limited by the capacity of IEEE double-precision floating point
numbers, which perl uses for all floating point math.

These limits do not result in a static number of digits. The more you use to the
left of the decimal place, the less you can use to the right without loosing
precision.

The total range for the mantissa of a double-precision float is 52-bits, with 1
bit for sign. This means that the range between your most significant and least
significant digit of the final summed answer cannot be greater than 2^51, or
you'll loose precision.

The total range for the exponent of a double-precision float is 2^1023, so you
cannot express any numbers larger than 2^51 + 2^1023.


Reply via email to