-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR #1777: Avoid std::ldexp in
operator double(int128)
.
Imported from GitHub PR #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 a21b1c9 into 8783136 Merging this change closes #1777 COPYBARA_INTEGRATE_REVIEW=#1777 from degasus:int128_t a21b1c9 PiperOrigin-RevId: 688968524 Change-Id: Id88cf38e241553f88bf4d97e7b001247dcd5599b
- Loading branch information
1 parent
8783136
commit 94e64f0
Showing
3 changed files
with
19 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters