🔨 clean up

This commit is contained in:
Niels Lohmann 2019-03-18 13:53:48 +01:00
parent 9fc093c9e0
commit 8d3f4f21bc
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
11 changed files with 432 additions and 512 deletions

View file

@ -204,7 +204,7 @@ boundaries compute_boundaries(FloatType value)
const std::uint64_t E = bits >> (kPrecision - 1);
const std::uint64_t F = bits & (kHiddenBit - 1);
const bool is_denormal = (E == 0);
const bool is_denormal = E == 0;
const diyfp v = is_denormal
? diyfp(F, kMinExp)
: diyfp(F + kHiddenBit, static_cast<int>(E) - kBias);
@ -230,7 +230,7 @@ boundaries compute_boundaries(FloatType value)
// -----------------+------+------+-------------+-------------+--- (B)
// v- m- v m+ v+
const bool lower_boundary_is_closer = (F == 0 and E > 1);
const bool lower_boundary_is_closer = F == 0 and E > 1;
const diyfp m_plus = diyfp(2 * v.f + 1, v.e - 1);
const diyfp m_minus = lower_boundary_is_closer
? diyfp(4 * v.f - 1, v.e - 2) // (B)