summaryrefslogtreecommitdiffstats
path: root/third_party/jpeg-xl/lib/jxl/rational_polynomial_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/jpeg-xl/lib/jxl/rational_polynomial_test.cc')
-rw-r--r--third_party/jpeg-xl/lib/jxl/rational_polynomial_test.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/third_party/jpeg-xl/lib/jxl/rational_polynomial_test.cc b/third_party/jpeg-xl/lib/jxl/rational_polynomial_test.cc
index bc31cdd092..e5211cda7a 100644
--- a/third_party/jpeg-xl/lib/jxl/rational_polynomial_test.cc
+++ b/third_party/jpeg-xl/lib/jxl/rational_polynomial_test.cc
@@ -158,8 +158,8 @@ void TestExp() {
const T q[4 * (2 + 1)] = {HWY_REP4(9.6259895571622622E-01),
HWY_REP4(-4.7272457588933831E-01),
HWY_REP4(7.4802088567547664E-02)};
- const T err =
- RunApproximation(-1, 1, p, q, EvalPoly(), [](T x) { return T(exp(x)); });
+ const T err = RunApproximation(-1, 1, p, q, EvalPoly(),
+ [](T x) { return static_cast<T>(exp(x)); });
EXPECT_LT(err, 1E-4);
}
@@ -174,8 +174,8 @@ void TestNegExp() {
HWY_REP4(5.9579108238812878E-02), HWY_REP4(3.4542074345478582E-02),
HWY_REP4(8.7263562483501714E-03), HWY_REP4(1.4095109143061216E-03)};
- const T err =
- RunApproximation(0, 10, p, q, EvalPoly(), [](T x) { return T(exp(-x)); });
+ const T err = RunApproximation(0, 10, p, q, EvalPoly(),
+ [](T x) { return static_cast<T>(exp(-x)); });
EXPECT_LT(err, sizeof(T) == 8 ? 2E-5 : 3E-5);
}
@@ -191,7 +191,7 @@ void TestSin() {
HWY_REP4(3.1546157932479282E-03), HWY_REP4(-1.6692542019380155E-04)};
const T err = RunApproximation(0, Pi<T>(1) * 2, p, q, EvalPoly(),
- [](T x) { return T(sin(x)); });
+ [](T x) { return static_cast<T>(sin(x)); });
EXPECT_LT(err, sizeof(T) == 8 ? 5E-4 : 7E-4);
}