Package: m2m-aligner / 1.2-2

1003_use_std_log_instead_of_logl.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Description: replaces logl with std::log
Author: Giulio Paci <giuliopaci@gmail.com>
Forwarded: yes
--- a/mmEM.cpp
+++ b/mmEM.cpp
@@ -765,7 +765,7 @@
 				{
 					string ssX = join(x, xl-i,i);
 	
-					long double score = (long double) logl(probs[ssX][myParam.nullChar]) * i;
+					long double score = (long double) std::log((long double)probs[ssX][myParam.nullChar]) * i;
 					qtmp.backX = i;
 					qtmp.backY = 0;
 
@@ -784,7 +784,7 @@
 				{
 					string ssY = join(y, yl-j, j);
 
-					long double score = (long double) logl(probs[myParam.nullChar][ssY]) * j;
+					long double score = (long double) std::log((long double)probs[myParam.nullChar][ssY]) * j;
 					qtmp.backX = 0;
 					qtmp.backY = j;
 
@@ -814,7 +814,7 @@
 						string ssX = join(x, xl-i ,i);
 						string ssY = join(y, yl-j, j);
 
-						long double score = (long double) logl(probs[ssX][ssY]) * max(i,j);
+						long double score = (long double) std::log((long double)probs[ssX][ssY]) * max(i,j);
 						qtmp.backX = i;
 						qtmp.backY = j;
 						for (int rindex = 0; rindex < Q[xl-i][yl-j].size(); rindex++)
@@ -950,7 +950,7 @@
 					//string ssX = x.substr(xl-i,i);
 					string ssX = join(x, xl-i,i);
 
-					score = (long double) logl(probs[ssX][myParam.nullChar]) * i;
+					score = (long double) std::log((long double)probs[ssX][myParam.nullChar]) * i;
 					if (score + Q[xl-i][yl] > Q[xl][yl])
 					{
 						Q[xl][yl] = score + Q[xl-i][yl];
@@ -967,7 +967,7 @@
 					//string ssY = y.substr(yl-j,j);
 					string ssY = join(y, yl-j, j);
 
-					score = (long double) logl(probs[myParam.nullChar][ssY]) * j;
+					score = (long double) std::log((long double)probs[myParam.nullChar][ssY]) * j;
 					if (score + Q[xl][yl-j] > Q[xl][yl])
 					{
 						Q[xl][yl] = score + Q[xl][yl-j];
@@ -996,7 +996,7 @@
 						string ssX = join(x, xl-i ,i);
 						string ssY = join(y, yl-j, j);
 
-						score = (long double) logl(probs[ssX][ssY]) * max(i,j);
+						score = (long double) std::log((long double)probs[ssX][ssY]) * max(i,j);
 						if ( score + Q[xl-i][yl-j] > Q[xl][yl])
 						{
 							Q[xl][yl] = score + Q[xl-i][yl-j];