Skip to content

Commit 1b8a11b

Browse files
committed
Fix decimal128_fast scalblnd128f implementation by constructing new val
1 parent 1ec7769 commit 1b8a11b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/boost/decimal/decimal128_fast.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,7 @@ constexpr auto scalblnd128f(decimal128_fast num, long exp) noexcept -> decimal12
13701370
}
13711371
#endif
13721372

1373-
num.exponent_ = static_cast<decimal128_fast::exponent_type>(static_cast<long>(num.biased_exponent()) + exp);
1373+
num = decimal128_fast(num.significand_, num.biased_exponent() + exp, num.sign_);
13741374

13751375
return num;
13761376
}

0 commit comments

Comments
 (0)