procmail
[Top] [All Lists]

Re: exactly once

2004-08-24 17:39:07
Mike Peeler wrote:

David Tamkin wrote:

 * 1^.-5 ! ? command

I think you meant -.5 rather than .-5 there.

Yes, 1^-.5 -- thanks for catching that.

Anyway, it may be worth motivating David's choice of a .8 cutoff.

It's no mystery.

If the exit code is 0, the score is 0.
If the exit code is 1, the score is 1.
Thereafter, it drops or rises alternately by 1 times the next power of .5, so

2 yields 1 - .5 = .5
3 makes it .5 + .25 = .75

and thereafter it bounces either side of 2/3, always overshooting the mark with decreasing error, but it will never get back up to, much less higher than, .75 again.

So I wanted a match on a score of 1 and a non-match on any score of .75 or lower. That required adding a constant of no less than -.75 but greater than 1. The two choices that require the least typing are -.8 and -.9; either one will do equally well.

And for the record, in my first attempt to type the preceding paragraph, I had ".-9" instead of "-.9"; it's very hard for me to type correctly!


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>