From 0c7e9c8960e296d4b2a1e571a21929d2a16d5e18 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 18 Aug 2010 15:35:26 +0400 Subject: [PATCH] * Fix normalization for systems that have not tanhl function --- src/classifiers/winnow.c | 4 ++-- 1 file 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; -- 2.39.5