bogofilter's tests vs. hp-ux risc

David Relson relson at osagesoftware.com
Wed Nov 27 23:53:55 CET 2002


Allyn,

I found a behaviorial difference between hp-ux (risc) and linux (intel), 
that accounts for the problems you have been having with the new test 
framework.  There's a loop in graham.c for populating the extrema array 
with the 15 most interesting tokens.  As tokens have floating point 
spamicity probabilities, the loop does a lot of floating point 
compares.  Apparently there are rounding and/or precision differences 
between the risc and intel architectures which will populate the array 
differently.  Changing the code from "if (float1>float2)" to "if 
(float1-float2>EPS)" solves the problem.  When I run "make check" on hp-ux, 
the set of 10 tests all pass.  Since the code change does not affect the 
results on linux(intel), and _does_ affect the results on hp-ux(risc), it 
seems that the floating point issue is risc specific.  Wherever the problem 
is, it _is_ fixed now.

Note, the bogoutil test is still failing.  There is an issue of shell 
syntax that perhaps you can solve.  Go to directory 
"bogofilter-0.9.0.3/tests/bogoutil" and run "make check".  You'll see the 
problem.

David





More information about the bogofilter-dev mailing list