Fix ambiguous call to std::pow after one of its arguments was

converted to size_t.
This commit is contained in:
Laurent Rineau 2010-08-23 08:13:13 +00:00
parent 714149267e
commit 9805a957d1
1 changed files with 10 additions and 3 deletions

View File

@ -422,9 +422,16 @@ fill_matrix(InputIterator begin, InputIterator end,
y = itb->y();
// Z[line_count] = itb->z();
Z.set(line_count,itb->z());
for (std::size_t k=0; k <= d; k++) for (std::size_t i=0; i<=k; i++)
M.set(line_count, k*(k+1)/2+i, std::pow(x,k-i)*std::pow(y,i)
/(fact(i)*fact(k-i)*std::pow(this->preconditionning,k)));
for (std::size_t k=0; k <= d; k++) {
for (std::size_t i=0; i<=k; i++) {
M.set(line_count, k*(k+1)/2+i,
std::pow(x,static_cast<double>(k-i))
* std::pow(y,static_cast<double>(i))
/( fact(i) *
fact(k-i)
*std::pow(this->preconditionning,static_cast<double>(k))));
}
}
line_count++;
}
}