From ce9a18da4516f53ecf23fb7522562aef2d470397 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Thu, 3 May 2012 20:57:19 -0400 Subject: fix for older gcc --- dtrain/score.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dtrain') 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& hyp, vector& 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(N_-i))); } return brevity_penalty(hyp_len, ref_len) * sum; } -- cgit v1.2.3