use math function adapted to the Scalar type instead of hardcoding float or

double
This commit is contained in:
Thomas Capricelli
2009-08-21 00:04:41 +02:00
parent d05af200a5
commit 054652b789
6 changed files with 16 additions and 16 deletions

View File

@@ -15,7 +15,7 @@ void ei_chkder(
{
const Scalar eps = ei_sqrt(epsilon<Scalar>());
const Scalar epsf = chkder_factor * epsilon<Scalar>();
const Scalar epslog = chkder_log10e * log(eps);
const Scalar epslog = chkder_log10e * ei_log(eps);
Scalar temp;
int i,j;
@@ -52,7 +52,7 @@ void ei_chkder(
}
err[i] = 1.;
if (temp > epsilon<Scalar>() && temp < eps) {
err[i] = (chkder_log10e * log(temp) - epslog) / epslog;
err[i] = (chkder_log10e * ei_log(temp) - epslog) / epslog;
}
if (temp >= eps) {
err[i] = 0.;