Apply clang-format

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Raúl Marín 2026-09-23 19:29:26 +02:00
parent 3e852fe376
commit 18ee067179
2 changed files with 6 additions and 6 deletions

View File

@ -104,10 +104,9 @@ compute_float(int64_t q, uint64_t w) noexcept {
adjusted_mantissa answer;
// One comparison for both ends of the range, then zero vs infinity without
// a branch: it follows the sign of the exponent, which is unpredictable.
bool const q_out_of_range =
uint64_t(q - binary::smallest_power_of_ten()) >
uint64_t(binary::largest_power_of_ten() -
binary::smallest_power_of_ten());
bool const q_out_of_range = uint64_t(q - binary::smallest_power_of_ten()) >
uint64_t(binary::largest_power_of_ten() -
binary::smallest_power_of_ten());
if ((w == 0) || q_out_of_range) {
bool const underflow = (w == 0) | (q < binary::smallest_power_of_ten());
answer.power2 = int32_t(!underflow) * binary::infinite_power();

View File

@ -458,8 +458,9 @@ from_chars_float_advanced(UC const *first, UC const *last, T &value,
// Test for over/underflow. One comparison catches both a zero and an
// infinite exponent, so normal values pay a single, never-taken branch. The
// result is then selected: which case it is follows the sign of the exponent.
if fastfloat_clang_unlikely (uint32_t(am.power2 - 1) >=
uint32_t(binary_format<T>::infinite_power() - 1)) {
constexpr uint32_t max_power2 =
uint32_t(binary_format<T>::infinite_power() - 1);
if fastfloat_clang_unlikely (uint32_t(am.power2 - 1) >= max_power2) {
bool const out_of_range =
(am.power2 != 0) | ((am.mantissa == 0) & (pns.mantissa != 0));
answer.ec = out_of_range ? std::errc::result_out_of_range : answer.ec;