summaryrefslogtreecommitdiff
path: root/absl/base/internal/exponential_biased.h
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2021-06-24 09:53:14 -0700
committerGravatar rogeeff <rogeeff@google.com>2021-06-27 12:10:27 -0400
commit9a7e447c511dae7276ab65fde4d04f6ed52b39c9 (patch)
tree4f744fc17c0ee56f9af1c7d1ff8f5c3d1b9e3666 /absl/base/internal/exponential_biased.h
parenta2419e63b8ae3b924152822f3c9f9da67ff6e215 (diff)
Export of internal Abseil changes
-- 373171b46238585c818cec37af26959f5412f813 by Abseil Team <absl-team@google.com>: Build with -Wl,-no-undefined. PiperOrigin-RevId: 381276748 -- da32624792d2948fe83d0ce58794d505799ab5d0 by Benjamin Barenblat <bbaren@google.com>: s/round/rint/ in exponential_biased `rint` differs from `round` in that it uses the current FPU rounding mode. It’s thus potentially faster, since it doesn’t have to save and restore FPU state. It also is more reflective of developer intent – most developers expect all FPU operations to use the current rounding mode, and having exponential_biased follow that rule seems ideal. PiperOrigin-RevId: 381268264 -- 8f860253a4283d2cc8230fe98d7cdf7bcb3e05f1 by Abseil Team <absl-team@google.com>: Internal change. PiperOrigin-RevId: 381264180 GitOrigin-RevId: 373171b46238585c818cec37af26959f5412f813 Change-Id: Iefe60b15c80318a7707e0c32159ac004bfa26d72
Diffstat (limited to 'absl/base/internal/exponential_biased.h')
-rw-r--r--absl/base/internal/exponential_biased.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/absl/base/internal/exponential_biased.h b/absl/base/internal/exponential_biased.h
index 94f79a33..a81f10e2 100644
--- a/absl/base/internal/exponential_biased.h
+++ b/absl/base/internal/exponential_biased.h
@@ -66,7 +66,7 @@ namespace base_internal {
// Adjusting with rounding bias is relatively trivial:
//
// double value = bias_ + exponential_distribution(mean)();
-// double rounded_value = std::round(value);
+// double rounded_value = std::rint(value);
// bias_ = value - rounded_value;
// return rounded_value;
//