We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent282d2a0 commitbab16afCopy full SHA for bab16af
src/backend/utils/adt/tsrank.c
@@ -7,7 +7,7 @@
7
*
8
9
* IDENTIFICATION
10
- * $PostgreSQL: pgsql/src/backend/utils/adt/tsrank.c,v 1.7 2007/09/13 06:54:35 teodor Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/tsrank.c,v 1.8 2007/09/20 18:10:57 teodor Exp $
11
12
*-------------------------------------------------------------------------
13
*/
@@ -21,7 +21,7 @@
21
#include"miscadmin.h"
22
23
24
-staticfloatweights[]= {0.1,0.2,0.4,1.0};
+staticfloatweights[]= {0.1f,0.2f,0.4f,1.0f};
25
26
#definewpos(wep)( w[ WEP_GETWEIGHT(wep) ] )
27
@@ -43,7 +43,7 @@ static float4
43
word_distance(int4w)
44
{
45
if (w>100)
46
-return1e-30;
+return1e-30f;
47
48
return1.0 / (1.005+0.05*exp(((float4)w) /1.5-2));
49
}
@@ -336,7 +336,7 @@ calc_rank(float *w, TSVector t, TSQuery q, int4 method)
336
calc_rank_and(w,t,q) :calc_rank_or(w,t,q);
337
338
if (res<0)
339
-res=1e-20;
+res=1e-20f;
340
341
if ((method&RANK_NORM_LOGLENGTH)&&t->size>0)
342
res /=log((double) (cnt_length(t)+1)) /log(2.0);