From: Gilles D. <gr...@sc...> - 2004-07-02 16:51:00
|
According to Joe R. Jah: > If it works we can fix 3.2.0b6 too: > > --- htsearch/Display.cc.orig Fri May 28 06:15:24 2004 > +++ htsearch/Display.cc Thu Jul 1 15:51:29 2004 > @@ -362,7 +362,7 @@ > > if (maxScore != 0 && maxScore != minScore) > { > - int percent = (int)((ref->DocScore() - minScore) * 100 / > + int percent = (int)((ref->DocScore() - minScore) * 100.0 / > (maxScore - minScore)); > if (percent <= 0) > percent = 1; > Thanks, Joe, but this shouldn't be an issue with the 3.2 code. Not that your patch would hurt anything, and indeed it makes it more clear what's going on, but it won't make any difference as far as generated code. In 3.2, DocScore() and minScore are doubles, not ints, so the multiplication will be done using doubles as well. The problem in 3.1.x is DocScore() was an int. The 3.1.6 patch seems bang on, as far as I can tell. This certainly explains some of the complaints we've had in the past about weird rankings in 3.1.x, but never got to the bottom of. -- Gilles R. Detillieux E-mail: <gr...@sc...> Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/ Dept. Physiology, U. of Manitoba Winnipeg, MB R3E 3J7 (Canada) |