diff options
Diffstat (limited to 'absl/random/internal/generate_real.h')
-rw-r--r-- | absl/random/internal/generate_real.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/absl/random/internal/generate_real.h b/absl/random/internal/generate_real.h index 4f62873d..d5fbb44c 100644 --- a/absl/random/internal/generate_real.h +++ b/absl/random/internal/generate_real.h @@ -127,10 +127,8 @@ inline RealType GenerateRealFromBits(uint64_t bits, int exp_bias = 0) { // Construct the 32-bit or 64-bit IEEE 754 floating-point value from // the individual fields: sign, exp, mantissa(bits). - uint_type val = - (std::is_same<SignedTag, GeneratePositiveTag>::value ? 0u : sign) | - (static_cast<uint_type>(exp) << kExp) | - (static_cast<uint_type>(bits) & kMask); + uint_type val = sign | (static_cast<uint_type>(exp) << kExp) | + (static_cast<uint_type>(bits) & kMask); // bit_cast to the output-type real_type result; |