File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -93,8 +93,8 @@ compute_error(int64_t q, uint64_t w) noexcept {
9393 return compute_error_scaled<binary>(q, product.high , lz);
9494}
9595
96- // w * 10 ** q
97- // The returned value should be a valid ieee64 number that simply need to be
96+ // Computers w * 10 ** q.
97+ // The returned value should be a valid number that simply needs to be
9898// packed. However, in some very rare cases, the computation will fail. In such
9999// cases, we return an adjusted_mantissa with a negative power of 2: the caller
100100// should recompute in such cases.
@@ -158,7 +158,8 @@ compute_float(int64_t q, uint64_t w) noexcept {
158158 // next line is safe because -answer.power2 + 1 < 64
159159 answer.mantissa >>= -answer.power2 + 1 ;
160160 // Thankfully, we can't have both "round-to-even" and subnormals because
161- // "round-to-even" only occurs for powers close to 0.
161+ // "round-to-even" only occurs for powers close to 0 in the 32-bit and
162+ // and 64-bit case (with no more than 19 digits).
162163 answer.mantissa += (answer.mantissa & 1 ); // round up
163164 answer.mantissa >>= 1 ;
164165 // There is a weird scenario where we don't have a subnormal but just.
You can’t perform that action at this time.
0 commit comments