lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/search Similarity.java
Date Fri, 24 Jan 2003 18:33:28 GMT
cutting     2003/01/24 10:33:28

  Modified:    src/java/org/apache/lucene/search Similarity.java
  Log:
  Fixed a bug in floatToByte().
  
  Revision  Changes    Path
  1.5       +3 -3      jakarta-lucene/src/java/org/apache/lucene/search/Similarity.java
  
  Index: Similarity.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/search/Similarity.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Similarity.java	7 Nov 2002 17:31:26 -0000	1.4
  +++ Similarity.java	24 Jan 2003 18:33:27 -0000	1.5
  @@ -212,9 +212,9 @@
         mantissa = 7;
       }
   
  -    if (exponent < 1) {                           // underflow: use min value
  -      exponent = 1;
  -      mantissa = 0;
  +    if (exponent < 0) {                           // underflow: use min value
  +      exponent = 0;
  +      mantissa = 1;
       }
   
       return (byte)((exponent << 3) | mantissa);    // pack into a byte
  
  
  

--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message