summaryrefslogtreecommitdiff
path: root/myisam/ftdefs.h
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2002-10-25 22:07:04 +0000
committerunknown <serg@serg.mysql.com>2002-10-25 22:07:04 +0000
commit7962de4cf303e71600f7ff2beebcb5900ef41f71 (patch)
treea265b1027bdd9f187cbc41ed6c5c709d6793109e /myisam/ftdefs.h
parentd51b72cac30e5d02fde6e9c98c3e91716b19ed04 (diff)
parentf5563ddad40e8ab84d457b0e9960ddfdc7faec99 (diff)
downloadmariadb-git-7962de4cf303e71600f7ff2beebcb5900ef41f71.tar.gz
merged
BitKeeper/etc/gone: auto-union BitKeeper/etc/logging_ok: auto-union BitKeeper/deleted/.del-skipkeys~888e38cf95239a33: 'Auto converge rename' Docs/manual.texi: Auto merged libmysqld/lib_sql.cc: Auto merged myisam/ft_boolean_search.c: Auto merged myisam/ft_nlq_search.c: Auto merged myisam/ft_parser.c: Auto merged myisam/ftdefs.h: Auto merged myisam/mi_create.c: Auto merged mysys/my_init.c: Auto merged sql/log.cc: Auto merged sql/log_event.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_update.cc: Auto merged
Diffstat (limited to 'myisam/ftdefs.h')
-rw-r--r--myisam/ftdefs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/myisam/ftdefs.h b/myisam/ftdefs.h
index 22a81ca4f9c..592b60a0133 100644
--- a/myisam/ftdefs.h
+++ b/myisam/ftdefs.h
@@ -78,7 +78,7 @@ extern ulong collstat;
/* Mysterious, but w/o (double) GWS_IDF performs better :-o */
#define GWS_IDF log(aio->info->state->records/doc_cnt)
#define GWS_IDF1 log((double)aio->info->state->records/doc_cnt)
-#define GWS_PROB log(((double)(aio->info->state->records-doc_cnt))/doc_cnt)
+#define GWS_PROB ((aio->info->state->records > doc_cnt) ? log(((double)(aio->info->state->records-doc_cnt))/doc_cnt) : 0 )
#define GWS_FREQ (1.0/doc_cnt)
#define GWS_SQUARED pow(log((double)aio->info->state->records/doc_cnt),2)
#define GWS_CUBIC pow(log((double)aio->info->state->records/doc_cnt),3)