Fix parse_number_f64_eisel_lemire comment typos
diff --git a/internal/cgen/base/floatconv-submodule-code.c b/internal/cgen/base/floatconv-submodule-code.c
index e6de026..16ed86b 100644
--- a/internal/cgen/base/floatconv-submodule-code.c
+++ b/internal/cgen/base/floatconv-submodule-code.c
@@ -978,7 +978,7 @@
//
// Preconditions:
// - man is non-zero.
-// - exp10 is in the range -307 ..= 288, the same range of the
+// - exp10 is in the range [-307 ..= 288], the same range of the
// wuffs_base__private_implementation__powers_of_10 array.
//
// The exp10 range (and the fact that man is in the range [1 ..= UINT64_MAX],
diff --git a/internal/cgen/base/floatconv-submodule-data.c b/internal/cgen/base/floatconv-submodule-data.c
index c36a22b..0bb006e 100644
--- a/internal/cgen/base/floatconv-submodule-data.c
+++ b/internal/cgen/base/floatconv-submodule-data.c
@@ -131,7 +131,7 @@
// wuffs_base__private_implementation__powers_of_10 contains truncated
// approximations to the powers of 10, ranging from 1e-307 to 1e+288 inclusive,
-// as 637 uint32_t quintuples (128-bit mantissa, 32-bit base-2 exponent biased
+// as 596 uint32_t quintuples (128-bit mantissa, 32-bit base-2 exponent biased
// by 0x04BE (which is 1214)). The array size is 596 * 5 = 2980.
//
// The 1214 bias in this look-up table equals 1023 + 191. 1023 is the bias for
diff --git a/internal/cgen/data/data.go b/internal/cgen/data/data.go
index 869cb9d..5bc3861 100644
--- a/internal/cgen/data/data.go
+++ b/internal/cgen/data/data.go
@@ -385,13 +385,13 @@
" upper_delta = +1;\n } else if (hd != ud) {\n // For example:\n // h = 12345???\n // upper = 12346???\n upper_delta = +0;\n }\n } else if (upper_delta == 0) {\n if ((hd != 9) || (ud != 0)) {\n // For example:\n // h = 1234598?\n // upper = 1234600?\n upper_delta = +1;\n }\n }\n\n // We can round up if upper has a different digit than h and either upper\n // is inclusive or upper is bigger than the result of rounding up.\n bool can_round_up =\n (upper_delta > 0) || //\n ((upper_delta == 0) && //\n (inclusive || ((ui + 1) < ((int32_t)(upper.num_digits)))));\n\n // If we can round either way, round to nearest. If we can round only one\n // way, do it. If we can't round, continue the loop.\n if (can_round_down) {\n if (can_round_up) {\n wuffs_base__private_implementation__high_prec_dec__round_nearest(\n h, hi + 1);\n return;\n } else {\n wuffs_base__private_implementat" +
"ion__high_prec_dec__round_down(h,\n hi + 1);\n return;\n }\n } else {\n if (can_round_up) {\n wuffs_base__private_implementation__high_prec_dec__round_up(h, hi + 1);\n return;\n }\n }\n }\n}\n\n" +
"" +
- "// --------\n\n// wuffs_base__private_implementation__parse_number_f64_eisel_lemire produces\n// the IEEE 754 double-precision value for an exact mantissa and base-10\n// exponent. For example:\n// - when parsing \"12345.678e+02\", man is 12345678 and exp10 is -1.\n// - when parsing \"-12\", man is 12 and exp10 is 0. Processing the leading\n// minus sign is the responsibility of the caller, not this function.\n//\n// On success, it returns a non-negative int64_t such that the low 63 bits hold\n// the 11-bit exponent and 52-bit mantissa.\n//\n// On failure, it returns a negative value.\n//\n// The algorithm is based on an original idea by Michael Eisel that was refined\n// by Daniel Lemire. See\n// https://lemire.me/blog/2020/03/10/fast-float-parsing-in-practice/\n//\n// Preconditions:\n// - man is non-zero.\n// - exp10 is in the range -307 ..= 288, the same range of the\n// wuffs_base__private_implementation__powers_of_10 array.\n//\n// The exp10 range (and the fact that man is in the range [1 ..= UINT64_MAX],\n// approximatel" +
- "y [1 ..= 1.85e+19]) means that (man * (10 ** exp10)) is in the\n// range [1e-307 ..= 1.85e+307]. This is entirely within the range of normal\n// (neither subnormal nor non-finite) f64 values: DBL_MIN and DBL_MAX are\n// approximately 2.23e–308 and 1.80e+308.\nstatic int64_t //\nwuffs_base__private_implementation__parse_number_f64_eisel_lemire(\n uint64_t man,\n int32_t exp10) {\n // Look up the (possibly truncated) base-2 representation of (10 ** exp10).\n // The look-up table was constructed so that it is already normalized: the\n // table entry's mantissa's MSB (most significant bit) is on.\n const uint32_t* po10 =\n &wuffs_base__private_implementation__powers_of_10[5 * (exp10 + 307)];\n\n // Normalize the man argument. The (man != 0) precondition means that a\n // non-zero bit exists.\n uint32_t clz = wuffs_base__count_leading_zeroes_u64(man);\n man <<= clz;\n\n // Calculate the return value's base-2 exponent. We might tweak it by ±1\n // later, but its initial value comes from the look-up table and c" +
- "lz.\n uint64_t ret_exp2 = ((uint64_t)po10[4]) - ((uint64_t)clz);\n\n // Multiply the two mantissas. Normalization means that both mantissas are at\n // least (1<<63), so the 128-bit product must be at least (1<<126). The high\n // 64 bits of the product, x_hi, must therefore be at least (1<<62).\n //\n // As a consequence, x_hi has either 0 or 1 leading zeroes. Shifting x_hi\n // right by either 9 or 10 bits (depending on x_hi's MSB) will therefore\n // leave the top 10 MSBs (bits 54 ..= 63) off and the 11th MSB (bit 53) on.\n wuffs_base__multiply_u64__output x = wuffs_base__multiply_u64(\n man, ((uint64_t)po10[2]) | (((uint64_t)po10[3]) << 32));\n uint64_t x_hi = x.hi;\n uint64_t x_lo = x.lo;\n\n // Before we shift right by at least 9 bits, recall that the look-up table\n // entry was possibly truncated. We have so far only calculated a lower bound\n // for the product (man * e), where e is (10 ** exp10). The upper bound would\n // add a further (man * 1) to the 128-bit product, which overflows the lower\n " +
- " // 64-bit limb if ((x_lo + man) < man).\n //\n // If overflow occurs, that adds 1 to x_hi. Since we're about to shift right\n // by at least 9 bits, that carried 1 can be ignored unless the higher 64-bit\n // limb's low 9 bits are all on.\n if (((x_hi & 0x1FF) == 0x1FF) && ((x_lo + man) < man)) {\n // Refine our calculation of (man * e). Before, our approximation of e used\n // a \"low resolution\" 64-bit mantissa. Now use a \"high resolution\" 128-bit\n // mantissa. We've already calculated x = (man * bits_0_to_63_incl_of_e).\n // Now calculate y = (man * bits_64_to_127_incl_of_e).\n wuffs_base__multiply_u64__output y = wuffs_base__multiply_u64(\n man, ((uint64_t)po10[0]) | (((uint64_t)po10[1]) << 32));\n uint64_t y_hi = y.hi;\n uint64_t y_lo = y.lo;\n\n // Merge the 128-bit x and 128-bit y, which overlap by 64 bits, to\n // calculate the 192-bit product of the 64-bit man by the 128-bit e.\n // As we exit this if-block, we only care about the high 128 bits\n // (merged_hi and merged_l" +
- "o) of that 192-bit product.\n uint64_t merged_hi = x_hi;\n uint64_t merged_lo = x_lo + y_hi;\n if (merged_lo < x_lo) {\n merged_hi++; // Carry the overflow bit.\n }\n\n // The \"high resolution\" approximation of e is still a lower bound. Once\n // again, see if the upper bound is large enough to produce a different\n // result. This time, if it does, give up instead of reaching for an even\n // more precise approximation to e.\n //\n // This three-part check is similar to the two-part check that guarded the\n // if block that we're now in, but it has an extra term for the middle 64\n // bits (checking that adding 1 to merged_lo would overflow).\n if (((merged_hi & 0x1FF) == 0x1FF) && ((merged_lo + 1) == 0) &&\n (y_lo + man < man)) {\n return -1;\n }\n\n // Replace the 128-bit x with merged.\n x_hi = merged_hi;\n x_lo = merged_lo;\n }\n\n // As mentioned above, shifting x_hi right by either 9 or 10 bits will leave\n // the top 10 MSBs (bits 54 ..= 63) off and the 11" +
- "th MSB (bit 53) on. If the\n // MSB (before shifting) was on, adjust ret_exp2 for the larger shift.\n //\n // Having bit 53 on (and higher bits off) means that ret_mantissa is a 54-bit\n // number.\n uint64_t msb = x_hi >> 63;\n uint64_t ret_mantissa = x_hi >> (msb + 9);\n ret_exp2 -= 1 ^ msb;\n\n // IEEE 754 rounds to-nearest with ties rounded to-even. Rounding to-even can\n // be tricky. If we're half-way between two exactly representable numbers\n // (x's low 73 bits are zero and the next 2 bits that matter are \"01\"), give\n // up instead of trying to pick the winner.\n //\n // Technically, we could tighten the condition by changing \"73\" to \"73 or 74,\n // depending on msb\", but a flat \"73\" is simpler.\n if ((x_lo == 0) && ((x_hi & 0x1FF) == 0) && ((ret_mantissa & 3) == 1)) {\n return -1;\n }\n\n // If we're not halfway then it's rounding to-nearest. Starting with a 54-bit\n // number, carry the lowest bit (bit 0) up if it's on. Regardless of whether\n // it was on or off, shifting right by one then produc" +
- "es a 53-bit number. If\n // carrying up overflowed, shift again.\n ret_mantissa += ret_mantissa & 1;\n ret_mantissa >>= 1;\n // This if block is equivalent to (but benchmarks slightly faster than) the\n // following branchless form:\n // uint64_t overflow_adjustment = ret_mantissa >> 53;\n // ret_mantissa >>= overflow_adjustment;\n // ret_exp2 += overflow_adjustment;\n if ((ret_mantissa >> 53) > 0) {\n ret_mantissa >>= 1;\n ret_exp2++;\n }\n\n // Starting with a 53-bit number, IEEE 754 double-precision normal numbers\n // have an implicit mantissa bit. Mask that away and keep the low 52 bits.\n ret_mantissa &= 0x000FFFFFFFFFFFFF;\n\n // Pack the bits and return.\n return ((int64_t)(ret_mantissa | (ret_exp2 << 52)));\n}\n\n" +
+ "// --------\n\n// wuffs_base__private_implementation__parse_number_f64_eisel_lemire produces\n// the IEEE 754 double-precision value for an exact mantissa and base-10\n// exponent. For example:\n// - when parsing \"12345.678e+02\", man is 12345678 and exp10 is -1.\n// - when parsing \"-12\", man is 12 and exp10 is 0. Processing the leading\n// minus sign is the responsibility of the caller, not this function.\n//\n// On success, it returns a non-negative int64_t such that the low 63 bits hold\n// the 11-bit exponent and 52-bit mantissa.\n//\n// On failure, it returns a negative value.\n//\n// The algorithm is based on an original idea by Michael Eisel that was refined\n// by Daniel Lemire. See\n// https://lemire.me/blog/2020/03/10/fast-float-parsing-in-practice/\n//\n// Preconditions:\n// - man is non-zero.\n// - exp10 is in the range [-307 ..= 288], the same range of the\n// wuffs_base__private_implementation__powers_of_10 array.\n//\n// The exp10 range (and the fact that man is in the range [1 ..= UINT64_MAX],\n// approximat" +
+ "ely [1 ..= 1.85e+19]) means that (man * (10 ** exp10)) is in the\n// range [1e-307 ..= 1.85e+307]. This is entirely within the range of normal\n// (neither subnormal nor non-finite) f64 values: DBL_MIN and DBL_MAX are\n// approximately 2.23e–308 and 1.80e+308.\nstatic int64_t //\nwuffs_base__private_implementation__parse_number_f64_eisel_lemire(\n uint64_t man,\n int32_t exp10) {\n // Look up the (possibly truncated) base-2 representation of (10 ** exp10).\n // The look-up table was constructed so that it is already normalized: the\n // table entry's mantissa's MSB (most significant bit) is on.\n const uint32_t* po10 =\n &wuffs_base__private_implementation__powers_of_10[5 * (exp10 + 307)];\n\n // Normalize the man argument. The (man != 0) precondition means that a\n // non-zero bit exists.\n uint32_t clz = wuffs_base__count_leading_zeroes_u64(man);\n man <<= clz;\n\n // Calculate the return value's base-2 exponent. We might tweak it by ±1\n // later, but its initial value comes from the look-up table and" +
+ " clz.\n uint64_t ret_exp2 = ((uint64_t)po10[4]) - ((uint64_t)clz);\n\n // Multiply the two mantissas. Normalization means that both mantissas are at\n // least (1<<63), so the 128-bit product must be at least (1<<126). The high\n // 64 bits of the product, x_hi, must therefore be at least (1<<62).\n //\n // As a consequence, x_hi has either 0 or 1 leading zeroes. Shifting x_hi\n // right by either 9 or 10 bits (depending on x_hi's MSB) will therefore\n // leave the top 10 MSBs (bits 54 ..= 63) off and the 11th MSB (bit 53) on.\n wuffs_base__multiply_u64__output x = wuffs_base__multiply_u64(\n man, ((uint64_t)po10[2]) | (((uint64_t)po10[3]) << 32));\n uint64_t x_hi = x.hi;\n uint64_t x_lo = x.lo;\n\n // Before we shift right by at least 9 bits, recall that the look-up table\n // entry was possibly truncated. We have so far only calculated a lower bound\n // for the product (man * e), where e is (10 ** exp10). The upper bound would\n // add a further (man * 1) to the 128-bit product, which overflows the lower" +
+ "\n // 64-bit limb if ((x_lo + man) < man).\n //\n // If overflow occurs, that adds 1 to x_hi. Since we're about to shift right\n // by at least 9 bits, that carried 1 can be ignored unless the higher 64-bit\n // limb's low 9 bits are all on.\n if (((x_hi & 0x1FF) == 0x1FF) && ((x_lo + man) < man)) {\n // Refine our calculation of (man * e). Before, our approximation of e used\n // a \"low resolution\" 64-bit mantissa. Now use a \"high resolution\" 128-bit\n // mantissa. We've already calculated x = (man * bits_0_to_63_incl_of_e).\n // Now calculate y = (man * bits_64_to_127_incl_of_e).\n wuffs_base__multiply_u64__output y = wuffs_base__multiply_u64(\n man, ((uint64_t)po10[0]) | (((uint64_t)po10[1]) << 32));\n uint64_t y_hi = y.hi;\n uint64_t y_lo = y.lo;\n\n // Merge the 128-bit x and 128-bit y, which overlap by 64 bits, to\n // calculate the 192-bit product of the 64-bit man by the 128-bit e.\n // As we exit this if-block, we only care about the high 128 bits\n // (merged_hi and merged" +
+ "_lo) of that 192-bit product.\n uint64_t merged_hi = x_hi;\n uint64_t merged_lo = x_lo + y_hi;\n if (merged_lo < x_lo) {\n merged_hi++; // Carry the overflow bit.\n }\n\n // The \"high resolution\" approximation of e is still a lower bound. Once\n // again, see if the upper bound is large enough to produce a different\n // result. This time, if it does, give up instead of reaching for an even\n // more precise approximation to e.\n //\n // This three-part check is similar to the two-part check that guarded the\n // if block that we're now in, but it has an extra term for the middle 64\n // bits (checking that adding 1 to merged_lo would overflow).\n if (((merged_hi & 0x1FF) == 0x1FF) && ((merged_lo + 1) == 0) &&\n (y_lo + man < man)) {\n return -1;\n }\n\n // Replace the 128-bit x with merged.\n x_hi = merged_hi;\n x_lo = merged_lo;\n }\n\n // As mentioned above, shifting x_hi right by either 9 or 10 bits will leave\n // the top 10 MSBs (bits 54 ..= 63) off and the " +
+ "11th MSB (bit 53) on. If the\n // MSB (before shifting) was on, adjust ret_exp2 for the larger shift.\n //\n // Having bit 53 on (and higher bits off) means that ret_mantissa is a 54-bit\n // number.\n uint64_t msb = x_hi >> 63;\n uint64_t ret_mantissa = x_hi >> (msb + 9);\n ret_exp2 -= 1 ^ msb;\n\n // IEEE 754 rounds to-nearest with ties rounded to-even. Rounding to-even can\n // be tricky. If we're half-way between two exactly representable numbers\n // (x's low 73 bits are zero and the next 2 bits that matter are \"01\"), give\n // up instead of trying to pick the winner.\n //\n // Technically, we could tighten the condition by changing \"73\" to \"73 or 74,\n // depending on msb\", but a flat \"73\" is simpler.\n if ((x_lo == 0) && ((x_hi & 0x1FF) == 0) && ((ret_mantissa & 3) == 1)) {\n return -1;\n }\n\n // If we're not halfway then it's rounding to-nearest. Starting with a 54-bit\n // number, carry the lowest bit (bit 0) up if it's on. Regardless of whether\n // it was on or off, shifting right by one then prod" +
+ "uces a 53-bit number. If\n // carrying up overflowed, shift again.\n ret_mantissa += ret_mantissa & 1;\n ret_mantissa >>= 1;\n // This if block is equivalent to (but benchmarks slightly faster than) the\n // following branchless form:\n // uint64_t overflow_adjustment = ret_mantissa >> 53;\n // ret_mantissa >>= overflow_adjustment;\n // ret_exp2 += overflow_adjustment;\n if ((ret_mantissa >> 53) > 0) {\n ret_mantissa >>= 1;\n ret_exp2++;\n }\n\n // Starting with a 53-bit number, IEEE 754 double-precision normal numbers\n // have an implicit mantissa bit. Mask that away and keep the low 52 bits.\n ret_mantissa &= 0x000FFFFFFFFFFFFF;\n\n // Pack the bits and return.\n return ((int64_t)(ret_mantissa | (ret_exp2 << 52)));\n}\n\n" +
"" +
"// --------\n\nstatic wuffs_base__result_f64 //\nwuffs_base__private_implementation__parse_number_f64_special(\n wuffs_base__slice_u8 s,\n uint32_t options) {\n do {\n if (options & WUFFS_BASE__PARSE_NUMBER_FXX__REJECT_INF_AND_NAN) {\n goto fail;\n }\n\n uint8_t* p = s.ptr;\n uint8_t* q = s.ptr + s.len;\n\n for (; (p < q) && (*p == '_'); p++) {\n }\n if (p >= q) {\n goto fail;\n }\n\n // Parse sign.\n bool negative = false;\n do {\n if (*p == '+') {\n p++;\n } else if (*p == '-') {\n negative = true;\n p++;\n } else {\n break;\n }\n for (; (p < q) && (*p == '_'); p++) {\n }\n } while (0);\n if (p >= q) {\n goto fail;\n }\n\n bool nan = false;\n switch (p[0]) {\n case 'I':\n case 'i':\n if (((q - p) < 3) || //\n ((p[1] != 'N') && (p[1] != 'n')) || //\n ((p[2] != 'F') && (p[2] != 'f'))) {\n goto fail;\n }\n p += 3;\n\n if ((p >= q) || (*p == '_" +
"')) {\n break;\n } else if (((q - p) < 5) || //\n ((p[0] != 'I') && (p[0] != 'i')) || //\n ((p[1] != 'N') && (p[1] != 'n')) || //\n ((p[2] != 'I') && (p[2] != 'i')) || //\n ((p[3] != 'T') && (p[3] != 't')) || //\n ((p[4] != 'Y') && (p[4] != 'y'))) {\n goto fail;\n }\n p += 5;\n\n if ((p >= q) || (*p == '_')) {\n break;\n }\n goto fail;\n\n case 'N':\n case 'n':\n if (((q - p) < 3) || //\n ((p[1] != 'A') && (p[1] != 'a')) || //\n ((p[2] != 'N') && (p[2] != 'n'))) {\n goto fail;\n }\n p += 3;\n\n if ((p >= q) || (*p == '_')) {\n nan = true;\n break;\n }\n goto fail;\n\n default:\n goto fail;\n }\n\n // Finish.\n for (; (p < q) && (*p == '_'); p++) {\n }\n if (p != q) {\n goto fail;\n }\n wuffs_base__result_f64 ret;\n" +
@@ -432,7 +432,7 @@
"5, 0, 0, 6, 2, 6, 1, 6, 1, 6, 9, 4, 5, 2, 6, 6, 7, 2, 3, 6, 3, 2, 8, 1, 2,\n 5, 2, 2, 2, 0, 4, 4, 6, 0, 4, 9, 2, 5, 0, 3, 1, 3, 0, 8, 0, 8, 4, 7, 2, 6,\n 3, 3, 3, 6, 1, 8, 1, 6, 4, 0, 6, 2, 5, 1, 1, 1, 0, 2, 2, 3, 0, 2, 4, 6, 2,\n 5, 1, 5, 6, 5, 4, 0, 4, 2, 3, 6, 3, 1, 6, 6, 8, 0, 9, 0, 8, 2, 0, 3, 1, 2,\n 5, 5, 5, 5, 1, 1, 1, 5, 1, 2, 3, 1, 2, 5, 7, 8, 2, 7, 0, 2, 1, 1, 8, 1, 5,\n 8, 3, 4, 0, 4, 5, 4, 1, 0, 1, 5, 6, 2, 5, 2, 7, 7, 5, 5, 5, 7, 5, 6, 1, 5,\n 6, 2, 8, 9, 1, 3, 5, 1, 0, 5, 9, 0, 7, 9, 1, 7, 0, 2, 2, 7, 0, 5, 0, 7, 8,\n 1, 2, 5, 1, 3, 8, 7, 7, 7, 8, 7, 8, 0, 7, 8, 1, 4, 4, 5, 6, 7, 5, 5, 2, 9,\n 5, 3, 9, 5, 8, 5, 1, 1, 3, 5, 2, 5, 3, 9, 0, 6, 2, 5, 6, 9, 3, 8, 8, 9, 3,\n 9, 0, 3, 9, 0, 7, 2, 2, 8, 3, 7, 7, 6, 4, 7, 6, 9, 7, 9, 2, 5, 5, 6, 7, 6,\n 2, 6, 9, 5, 3, 1, 2, 5, 3, 4, 6, 9, 4, 4, 6, 9, 5, 1, 9, 5, 3, 6, 1, 4, 1,\n 8, 8, 8, 2, 3, 8, 4, 8, 9, 6, 2, 7, 8, 3, 8, 1, 3, 4, 7, 6, 5, 6, 2, 5, 1,\n 7, 3, 4, 7, 2, 3, 4, 7, 5, 9, 7, 6, 8, 0, 7, 0, 9, 4, 4, 1, 1, 9, 2, 4, 4,\n " +
" 8, 1, 3, 9, 1, 9, 0, 6, 7, 3, 8, 2, 8, 1, 2, 5, 8, 6, 7, 3, 6, 1, 7, 3, 7,\n 9, 8, 8, 4, 0, 3, 5, 4, 7, 2, 0, 5, 9, 6, 2, 2, 4, 0, 6, 9, 5, 9, 5, 3, 3,\n 6, 9, 1, 4, 0, 6, 2, 5,\n};\n\n" +
"" +
- "// --------\n\n// wuffs_base__private_implementation__powers_of_10 contains truncated\n// approximations to the powers of 10, ranging from 1e-307 to 1e+288 inclusive,\n// as 637 uint32_t quintuples (128-bit mantissa, 32-bit base-2 exponent biased\n// by 0x04BE (which is 1214)). The array size is 596 * 5 = 2980.\n//\n// The 1214 bias in this look-up table equals 1023 + 191. 1023 is the bias for\n// IEEE 754 double-precision floating point. 191 is ((3 * 64) - 1) and\n// wuffs_base__private_implementation__parse_number_f64_eisel_lemire works with\n// multiples-of-64-bit mantissas.\n//\n// For example, the third approximation, for 1e-305, consists of the uint32_t\n// quintuple (0xFE94DE87, 0x331ACDAB, 0x29ABA83C, 0xE0B62E29, 0x0049,). The\n// first four form a little-endian uint128_t value. The last one is an int32_t\n// value: -1140. Together, they represent the approximation to 1e-324:\n// 0xE0B62E29_29ABA83C_331ACDAB_FE94DE87 * (2 ** (0x0049 - 0x04BE))\n//\n// Similarly, 1e+4 is approximated by the uint64_t quintuple\n// (0x00" +
+ "// --------\n\n// wuffs_base__private_implementation__powers_of_10 contains truncated\n// approximations to the powers of 10, ranging from 1e-307 to 1e+288 inclusive,\n// as 596 uint32_t quintuples (128-bit mantissa, 32-bit base-2 exponent biased\n// by 0x04BE (which is 1214)). The array size is 596 * 5 = 2980.\n//\n// The 1214 bias in this look-up table equals 1023 + 191. 1023 is the bias for\n// IEEE 754 double-precision floating point. 191 is ((3 * 64) - 1) and\n// wuffs_base__private_implementation__parse_number_f64_eisel_lemire works with\n// multiples-of-64-bit mantissas.\n//\n// For example, the third approximation, for 1e-305, consists of the uint32_t\n// quintuple (0xFE94DE87, 0x331ACDAB, 0x29ABA83C, 0xE0B62E29, 0x0049,). The\n// first four form a little-endian uint128_t value. The last one is an int32_t\n// value: -1140. Together, they represent the approximation to 1e-324:\n// 0xE0B62E29_29ABA83C_331ACDAB_FE94DE87 * (2 ** (0x0049 - 0x04BE))\n//\n// Similarly, 1e+4 is approximated by the uint64_t quintuple\n// (0x00" +
"000000, 0x00000000, 0x00000000, 0x9C400000, 0x044C) which means:\n// 0x9C400000_00000000_00000000_00000000 * (2 ** (0x044C - 0x04BE))\n//\n// Similarly, 1e+68 is approximated by the uint64_t quintuple\n// (0x63EE4BDD, 0x4CA7AAA8, 0xD4C4FB27, 0xED63A231, 0x0520) which means:\n// 0xED63A231_D4C4FB27.4CA7AAA8_63EE4BDD * (2 ** (0x0520 - 0x04BE))\n//\n// This table was generated by by script/print-mpb-powers-of-10.go\nstatic const uint32_t wuffs_base__private_implementation__powers_of_10[2980] = {\n 0x79F8E056, 0xA5D3B6D4, 0x06306BAB, 0x8FD0C162, 0x0043, // 1e-307\n 0x9877186C, 0x8F48A489, 0x87BC8696, 0xB3C4F1BA, 0x0046, // 1e-306\n 0xFE94DE87, 0x331ACDAB, 0x29ABA83C, 0xE0B62E29, 0x0049, // 1e-305\n 0x7F1D0B14, 0x9FF0C08B, 0xBA0B4925, 0x8C71DCD9, 0x004D, // 1e-304\n 0x5EE44DD9, 0x07ECF0AE, 0x288E1B6F, 0xAF8E5410, 0x0050, // 1e-303\n 0xF69D6150, 0xC9E82CD9, 0x32B1A24A, 0xDB71E914, 0x0053, // 1e-302\n 0x3A225CD2, 0xBE311C08, 0x9FAF056E, 0x892731AC, 0x0057, // 1e-301\n 0x48AAF406, 0x6DBD630A, 0xC79" +
"AC6CA, 0xAB70FE17, 0x005A, // 1e-300\n 0xDAD5B108, 0x092CBBCC, 0xB981787D, 0xD64D3D9D, 0x005D, // 1e-299\n 0x08C58EA5, 0x25BBF560, 0x93F0EB4E, 0x85F04682, 0x0061, // 1e-298\n 0x0AF6F24E, 0xAF2AF2B8, 0x38ED2621, 0xA76C5823, 0x0064, // 1e-297\n 0x0DB4AEE1, 0x1AF5AF66, 0x07286FAA, 0xD1476E2C, 0x0067, // 1e-296\n 0xC890ED4D, 0x50D98D9F, 0x847945CA, 0x82CCA4DB, 0x006B, // 1e-295\n 0xBAB528A0, 0xE50FF107, 0x6597973C, 0xA37FCE12, 0x006E, // 1e-294\n 0xA96272C8, 0x1E53ED49, 0xFEFD7D0C, 0xCC5FC196, 0x0071, // 1e-293\n 0x13BB0F7A, 0x25E8E89C, 0xBEBCDC4F, 0xFF77B1FC, 0x0074, // 1e-292\n 0x8C54E9AC, 0x77B19161, 0xF73609B1, 0x9FAACF3D, 0x0078, // 1e-291\n 0xEF6A2417, 0xD59DF5B9, 0x75038C1D, 0xC795830D, 0x007B, // 1e-290\n 0x6B44AD1D, 0x4B057328, 0xD2446F25, 0xF97AE3D0, 0x007E, // 1e-289\n 0x430AEC32, 0x4EE367F9, 0x836AC577, 0x9BECCE62, 0x0082, // 1e-288\n 0x93CDA73F, 0x229C41F7, 0x244576D5, 0xC2E801FB, 0x0085, // 1e-287\n 0x78C1110F, 0x6B435275, 0xED56D48A, 0xF3A20279, 0x0088, //" +
" 1e-286\n 0x6B78AAA9, 0x830A1389, 0x345644D6, 0x9845418C, 0x008C, // 1e-285\n 0xC656D553, 0x23CC986B, 0x416BD60C, 0xBE5691EF, 0x008F, // 1e-284\n 0xB7EC8AA8, 0x2CBFBE86, 0x11C6CB8F, 0xEDEC366B, 0x0092, // 1e-283\n 0x32F3D6A9, 0x7BF7D714, 0xEB1C3F39, 0x94B3A202, 0x0096, // 1e-282\n 0x3FB0CC53, 0xDAF5CCD9, 0xA5E34F07, 0xB9E08A83, 0x0099, // 1e-281\n 0x8F9CFF68, 0xD1B3400F, 0x8F5C22C9, 0xE858AD24, 0x009C, // 1e-280\n 0xB9C21FA1, 0x23100809, 0xD99995BE, 0x91376C36, 0x00A0, // 1e-279\n 0x2832A78A, 0xABD40A0C, 0x8FFFFB2D, 0xB5854744, 0x00A3, // 1e-278\n 0x323F516C, 0x16C90C8F, 0xB3FFF9F9, 0xE2E69915, 0x00A6, // 1e-277\n 0x7F6792E3, 0xAE3DA7D9, 0x907FFC3B, 0x8DD01FAD, 0x00AA, // 1e-276\n 0xDF41779C, 0x99CD11CF, 0xF49FFB4A, 0xB1442798, 0x00AD, // 1e-275\n 0xD711D583, 0x40405643, 0x31C7FA1D, 0xDD95317F, 0x00B0, // 1e-274\n 0x666B2572, 0x482835EA, 0x7F1CFC52, 0x8A7D3EEF, 0x00B4, // 1e-273\n 0x0005EECF, 0xDA324365, 0x5EE43B66, 0xAD1C8EAB, 0x00B7, // 1e-272\n 0x40076A82, 0x90BE" +
diff --git a/release/c/wuffs-unsupported-snapshot.c b/release/c/wuffs-unsupported-snapshot.c
index 394946b..858edf6 100644
--- a/release/c/wuffs-unsupported-snapshot.c
+++ b/release/c/wuffs-unsupported-snapshot.c
@@ -9987,7 +9987,7 @@
// wuffs_base__private_implementation__powers_of_10 contains truncated
// approximations to the powers of 10, ranging from 1e-307 to 1e+288 inclusive,
-// as 637 uint32_t quintuples (128-bit mantissa, 32-bit base-2 exponent biased
+// as 596 uint32_t quintuples (128-bit mantissa, 32-bit base-2 exponent biased
// by 0x04BE (which is 1214)). The array size is 596 * 5 = 2980.
//
// The 1214 bias in this look-up table equals 1023 + 191. 1023 is the bias for
@@ -11580,7 +11580,7 @@
//
// Preconditions:
// - man is non-zero.
-// - exp10 is in the range -307 ..= 288, the same range of the
+// - exp10 is in the range [-307 ..= 288], the same range of the
// wuffs_base__private_implementation__powers_of_10 array.
//
// The exp10 range (and the fact that man is in the range [1 ..= UINT64_MAX],