summaryrefslogtreecommitdiff
path: root/debian/patches/missing-rint.diff
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@google.com>2022-08-22 17:49:57 -0400
committerGravatar Benjamin Barenblat <bbaren@google.com>2022-08-22 22:14:31 -0400
commit170e05ec7974a1b7b5133f638e71881925cc7e68 (patch)
treed8bc02dad030ba3023f771660d5fab1758b9321f /debian/patches/missing-rint.diff
parent104bbd297d624819b37428882c54eade8b6ab74d (diff)
Update patches
Bump SONAME and inline namespace in configuration, update location of SSE2 and SSSE3 configuration, and delete patches that have been applied upstream.
Diffstat (limited to 'debian/patches/missing-rint.diff')
-rw-r--r--debian/patches/missing-rint.diff45
1 files changed, 0 insertions, 45 deletions
diff --git a/debian/patches/missing-rint.diff b/debian/patches/missing-rint.diff
deleted file mode 100644
index d9865364..00000000
--- a/debian/patches/missing-rint.diff
+++ /dev/null
@@ -1,45 +0,0 @@
-From: Benjamin Barenblat <bbaren@google.com>
-Subject: Round a double multiplication before casting it to integer
-Forwarded: yes
-Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/60be12ed9822078970f05f3c560324184302df6b
-
-The code
-
- static_cast<int>(x * y)
-
-(for double x and y) performs a double multiplication into a temporary
-that, by standard, may have excess precision. The subsequent cast to int
-discards the excess precision. However, the cast may examine the excess
-precision during conversion, producing surprising results like
-
- static_cast<int>(1.7 * 10) == 16
-
-on certain systems. Correct this case by explicitly rounding 1.7 * 10
-before casting it.
-
-The author works at Google. Upstream applied this patch as Piper
-revision 378922064 and exported it to GitHub; the Applied-Upstream URL
-above points to the exported commit.
-
---- a/absl/random/mocking_bit_gen_test.cc
-+++ b/absl/random/mocking_bit_gen_test.cc
-@@ -15,6 +15,7 @@
- //
- #include "absl/random/mocking_bit_gen.h"
-
-+#include <cmath>
- #include <numeric>
- #include <random>
-
-@@ -328,8 +329,9 @@ TEST(BasicMocking, WillByDefaultWithArgs) {
-
- absl::MockingBitGen gen;
- ON_CALL(absl::MockPoisson<int>(), Call(gen, _))
-- .WillByDefault(
-- [](double lambda) { return static_cast<int>(lambda * 10); });
-+ .WillByDefault([](double lambda) {
-+ return static_cast<int>(std::rint(lambda * 10));
-+ });
- EXPECT_EQ(absl::Poisson<int>(gen, 1.7), 17);
- EXPECT_EQ(absl::Poisson<int>(gen, 0.03), 0);
- }