I am trying to use pow in c++ and for some daft reason it is not working properly. I have used it before with no issues, so I am sure that there is just something that I am overlooking.
here is what I have:
const double epsilon = cutoff_velocity * dt; const double screen = ( d * d - epsilon * epsilon ); const double exponent = 1.5; f.push_back( - ( q * oq ) *d / abs(pow(screen, (double)exponent)));
where q, oq and d are all set elsewhere.
when I run this it calculates pow(double, int), instead of pow(double, double) as expected.
Cheers for any help.