Zend_Search_Lucene_Search_Similarity::encodeNorm
Encodes a normalization factor for storage in an index.
The encoding uses a five-bit exponent and three-bit mantissa, thus representing values from around 7x10^9 to 2x10^-9 with about one significant decimal digit of accuracy. Zero is also represented. Negative numbers are rounded up to zero. Values too large to represent are rounded down to the largest representable value. Positive values too small to represent are rounded up to the smallest positive representable value.
Signature
public function encodeNorm(float
$f )
Parameters
$f
— float
Returns
- integer