procmail
[Top] [All Lists]

Re: Procmail fractional scoring screwed up.

2003-03-10 12:35:47
On Mon, Mar 10, 2003 at 10:47:57AM -0800, Bart Schaefer wrote:

On Thu, 6 Mar 2003, Daryle A. Tilroe wrote:

John's 'good' value of .11  for a base doesn't work on my
version of procmail/redhat.  It actually gives bad results
and .1 gives the correct ones.  E.G. .1^1 with 100 matches
gives 10 but .11^1 with 100 matches gives <1.

I got curious and tried this with my procmail 3.22, RH Linux 6.2.
With the same input every time:

* 1^1 xx      Score:     100     100 "xx"

* .1^1 xx     Score:       9       9 "xx"

* .11^1 xx    Score:      10      10 "xx"

* .2^1 xx     Score:      19      19 "xx"

* 1^.9 xx     Score:       1       1 "xx"

* 10^.9 xx    Score:      91      91 "xx"

* 100^0.09 xx Score:     109     109 "xx"

* 100^0.009 xx        Score:     100     100 "xx"

I'm only guessing, but I'd suspect a rounding error when storing
the intermediate value between matches.  Different floating point
precision could explain why Daryle's results vary so much more wildly
than mine, and why it differs for different exponent values.

Really glad to read this.  I'd been meaning to test it too, but
am moving and haven't found the time.  Now I feel better about
this all.  Thanks, Bart.

-- 
dman

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail