Fix cppcheck-1.67 warnings
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / readir.c
index 2510750b83eb6efd7a520c46ff033a495eba12c4..1b76bae97c168709dc35dc3fb22f9d139ad0c62a 100644 (file)
@@ -159,7 +159,7 @@ static void GetSimTemps(int ntemps, t_simtemp *simtemp, double *temperature_lamb
         }
         else if (simtemp->eSimTempScale == esimtempEXPONENTIAL)
         {
-            simtemp->temperatures[i] = simtemp->simtemp_low + (simtemp->simtemp_high-simtemp->simtemp_low)*((exp(temperature_lambdas[i])-1)/(exp(1.0)-1));
+            simtemp->temperatures[i] = simtemp->simtemp_low + (simtemp->simtemp_high-simtemp->simtemp_low)*(gmx_expm1(temperature_lambdas[i])/gmx_expm1(1.0));
         }
         else
         {