summaryrefslogtreecommitdiffstats
path: root/third_party/jpeg-xl/lib/jxl/rational_polynomial_test.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /third_party/jpeg-xl/lib/jxl/rational_polynomial_test.cc
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-adbda400be353e676059e335c3c0aaf99e719475.tar.xz
firefox-adbda400be353e676059e335c3c0aaf99e719475.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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);
}