int128_have_intrinsic.inc
9.52 KB
-
PR #1777: Avoid std::ldexp in `operator double(int128)`. · 94e64f0c
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 a21b1c952494944e51e12c62127a71480bc28695 into 87831365 Merging this change closes #1777 COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1777 from degasus:int128_t a21b1c952494944e51e12c62127a71480bc28695 PiperOrigin-RevId: 688968524 Change-Id: Id88cf38e241553f88bf4d97e7b001247dcd5599b
Markus Wick committed