diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2012-05-03 20:57:19 -0400 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2012-05-03 20:57:19 -0400 |
commit | a3d0e4f8c8f669fd4c0dac7a193a12148253d4e2 (patch) | |
tree | efae433974946cdcd390d60a057ccc023e950a1f /dtrain | |
parent | d59bad87d2b3ce1abf881b0c4e5bbc7648cf368f (diff) |
fix for older gcc
Diffstat (limited to 'dtrain')
-rw-r--r-- | dtrain/score.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dtrain/score.cc b/dtrain/score.cc index 71d3e5de..7b1f6be4 100644 --- a/dtrain/score.cc +++ b/dtrain/score.cc @@ -103,7 +103,7 @@ SmoothBleuScorer::Score(vector<WordID>& hyp, vector<WordID>& ref, i_bleu[j] += (1/((score_t)j+1)) * i_ng; } } - sum += exp(i_bleu[i])/(pow(2, N_-i)); + sum += exp(i_bleu[i])/(pow(2.0, static_cast<double>(N_-i))); } return brevity_penalty(hyp_len, ref_len) * sum; } |