removed NaN warnings, as they are useless
This commit is contained in:
parent
5cd316ebc9
commit
d380860e78
|
@ -17,40 +17,10 @@ interaction_force_function
|
|||
{
|
||||
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]));
|
||||
#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]));
|
||||
#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]));
|
||||
#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]));
|
||||
#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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user