aboutsummaryrefslogtreecommitdiffstats
path: root/src/classifiers/winnow.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-08-18 15:35:26 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-08-18 15:35:26 +0400
commit0c7e9c8960e296d4b2a1e571a21929d2a16d5e18 (patch)
tree7fa3ea8952ab53a1dee02e614c1884131ad4f131 /src/classifiers/winnow.c
parent824cc64a68d7aa29926178bb6d8309625f4947e0 (diff)
downloadrspamd-0c7e9c8960e296d4b2a1e571a21929d2a16d5e18.tar.gz
rspamd-0c7e9c8960e296d4b2a1e571a21929d2a16d5e18.zip
* Fix normalization for systems that have not tanhl function
Diffstat (limited to 'src/classifiers/winnow.c')
-rw-r--r--src/classifiers/winnow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/classifiers/winnow.c b/src/classifiers/winnow.c
index c86782d85..c0c1bd755 100644
--- a/src/classifiers/winnow.c
+++ b/src/classifiers/winnow.c
@@ -274,7 +274,7 @@ winnow_classify (struct classifier_ctx *ctx, statfile_pool_t * pool, GTree * inp
* As some implementations of libm does not support tanhl, try to use
* tanh
*/
- max = tanh ((double) score);
+ max = tanh ((double) max);
#endif
sumbuf = memory_pool_alloc (task->task_pool, 32);
rspamd_snprintf (sumbuf, 32, "%.2F", max);
@@ -570,7 +570,7 @@ end:
* As some implementations of libm does not support tanhl, try to use
* tanh
*/
- *sum = tanh ((double) score);
+ *sum = tanh ((double) max);
#endif
}
return TRUE;