removed NaN warnings, as they are useless

This commit is contained in:
Daniel Knüttel 2019-07-15 16:09:42 +02:00
parent 5cd316ebc9
commit d380860e78

View File

@ -17,40 +17,10 @@ interaction_force_function
{ {
result += coefficients[i] * powf(r, i); result += coefficients[i] * powf(r, i);
} }
#ifdef WARN_NAN_OCCUR
if(isnan(result))
{
printf("got NaN from r = %f, in polynomial part\n", r);
}
#endif
result *= coefficients[7] * expf(coefficients[8] * (r - coefficients[9])); result *= coefficients[7] * expf(coefficients[8] * (r - coefficients[9]));
#ifdef WARN_NAN_OCCUR
if(isnan(result))
{
printf("got NaN from r = %f, in dampening part\n", r);
}
#endif
result += coefficients[10] * expf(coefficients[11] * (r - coefficients[12])); result += coefficients[10] * expf(coefficients[11] * (r - coefficients[12]));
#ifdef WARN_NAN_OCCUR
if(isnan(result))
{
printf("got NaN from r = %f, in O(r) exp part\n", r);
}
#endif
result += coefficients[13] * expf(coefficients[14] * raise2(r - coefficients[15])); result += coefficients[13] * expf(coefficients[14] * raise2(r - coefficients[15]));
#ifdef WARN_NAN_OCCUR
if(isnan(result))
{
printf("got NaN from r = %f, in O(r^2) exp part 1\n", r);
}
#endif
result += coefficients[16] * expf(coefficients[17] * raise2(r - coefficients[18])); result += coefficients[16] * expf(coefficients[17] * raise2(r - coefficients[18]));
#ifdef WARN_NAN_OCCUR
if(isnan(result))
{
printf("got NaN from r = %f, in O(r^2) exp part 2\n", r);
}
#endif
return result; return result;
} }