Commit 74ada2ea authored by Jan Möbius's avatar Jan Möbius

Warning

parent 7bcc3ec1
......@@ -150,14 +150,14 @@ public:
{
weights[K].resize(K+1);
// s(j) = ( 1/4 + cos(2*pi*j/K) + 1/2 * cos(4*pi*j/K) )/K
real_t invK = static_cast<real_t>(1.0)/real_t(K);
double invK = 1.0/static_cast<double>(K);
real_t sum = 0;
for(unsigned int j=0; j<K; ++j)
{
weights[K][j] = (0.25 + cos(2.0*M_PI*j*invK) + 0.5*cos(4.0*M_PI*j*invK))*invK;
weights[K][j] = static_cast<real_t>((0.25 + cos(2.0*M_PI*static_cast<double>(j)*invK) + 0.5*cos(4.0*M_PI*static_cast<double>(j)*invK))*invK);
sum += weights[K][j];
}
weights[K][K] = (real_t)1.0 - sum;
weights[K][K] = static_cast<real_t>(1.0) - sum;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment