diff --git a/butteraugli/butteraugli.h b/butteraugli/butteraugli.h index 31824b8..d9b35bd 100755 --- a/butteraugli/butteraugli.h +++ b/butteraugli/butteraugli.h @@ -518,7 +518,7 @@ struct RationalPolynomial { } // Evaluates the polynomial at x (in [min_value, max_value]). - inline double operator()(const float x) const { + inline double operator()(const double x) const { // First normalize to [0, 1]. const double x01 = (x - min_value) / (max_value - min_value); // And then to [-1, 1] domain of Chebyshev polynomials. @@ -527,7 +527,7 @@ struct RationalPolynomial { const double yp = EvaluatePolynomial(xc, p); const double yq = EvaluatePolynomial(xc, q); if (yq == 0.0) return 0.0; - return static_cast(yp / yq); + return yp / yq; } // Domain of the polynomials; they are undefined elsewhere. @@ -540,7 +540,7 @@ struct RationalPolynomial { double q[5 + 1]; }; -static inline float GammaPolynomial(float value) { +static inline double GammaPolynomial(double value) { // Generated by gamma_polynomial.m from equispaced x/gamma(x) samples. static const RationalPolynomial r = { 0.770000000000000, 274.579999999999984,