Files
abseil-cpp/absl/numeric
Markus Wick 94e64f0c5c PR #1777: Avoid std::ldexp in operator double(int128).
Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1777

This patch replaces all instances of

  std::ldexp(msb, 64)

with

  msb * (2**64)

as it turns out that this optimization is not done by MSVC. Worse, it emited a function call with error checking, even if the int128 cannot hit the inf limitation.

Sadly even the constant `std::ldexp(1.0, 64)` is not inlined: https://gcc.godbolt.org/z/oGhGz77sx
Merge a21b1c9524 into 878313658e

Merging this change closes #1777

COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1777 from degasus:int128_t a21b1c9524
PiperOrigin-RevId: 688968524
Change-Id: Id88cf38e241553f88bf4d97e7b001247dcd5599b
2024-10-23 08:09:57 -07:00
..
2023-09-13 07:09:00 -07:00