From: Vsevolod Stakhov Date: Wed, 18 Aug 2010 11:35:26 +0000 (+0400) Subject: * Fix normalization for systems that have not tanhl function X-Git-Tag: 0.3.2~28 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0c7e9c8960e296d4b2a1e571a21929d2a16d5e18;p=rspamd.git * Fix normalization for systems that have not tanhl function --- 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;