From 346915b450ca17c226b1f297fb76e54a1dd772b4 Mon Sep 17 00:00:00 2001 From: kevin Date: Mon, 1 Jun 2015 12:50:32 -0400 Subject: [PATCH] cmProc.c: Chnaged labs() to fabs() in calc of 'dLogProb' in cmChmmTrain(). --- cmProc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmProc.c b/cmProc.c index 1d167a1..8531a04 100644 --- a/cmProc.c +++ b/cmProc.c @@ -4393,7 +4393,7 @@ cmRC_t cmChmmTrain( cmChmm_t* p, const cmReal_t* oM, unsigned T, unsigned ite cmReal_t logProb0 = cmChmmForward( p, oM, T, alphaM, logPrV ); // check for convergence - cmReal_t dLogProb = labs(logProb0-logProb) / ((labs(logProb0)+labs(logProb)+cmReal_EPSILON)/2); + cmReal_t dLogProb = fabs(logProb0-logProb) / ((fabs(logProb0)+fabs(logProb)+cmReal_EPSILON)/2); if( dLogProb < thresh ) break;