diff --git a/doc/charconv/from_chars.adoc b/doc/charconv/from_chars.adoc index 8b3c730..6955c31 100644 --- a/doc/charconv/from_chars.adoc +++ b/doc/charconv/from_chars.adoc @@ -57,7 +57,7 @@ from_chars_result from_chars(const char* first, const char* last, Real& value, c * On std::errc::result_out_of_range we return ±0 for small values (e.g. 1.0e-99999) or ±HUGE_VAL for large values (e.g. 1.0e+99999) to match the handling of `std::strtod`. This is a divergence from the standard which states we should return the `value` argument unmodified. * These functions have been tested to support all built-in floating-point types and those from C++23's `` -** Long doubles can be either 64, 80, or 128-bit, but must be IEEE 754 compliant. An example of a non-compliant, and therefore unsupported format is `ibm128`. +** Long doubles can be either 64, 80, or 128-bit, but must be IEEE 754 compliant. An example of a non-compliant, and therefore unsupported format is `__ibm128`. ** Use of `__float128` or `std::float128_t` requires compiling with `-std=gnu++xx` and linking GCC's `libquadmath`. == Examples diff --git a/include/boost/charconv/to_chars.hpp b/include/boost/charconv/to_chars.hpp index fd72ea2..61b8906 100644 --- a/include/boost/charconv/to_chars.hpp +++ b/include/boost/charconv/to_chars.hpp @@ -355,7 +355,7 @@ to_chars_result to_chars_hex(char* first, char* last, Real value, int precision) *first++ = '-'; } - // Print the leading hexit and then mask away + // Print the integral part const auto leading_nibble = static_cast(aligned_significand >> hex_bits); *first++ = static_cast('0' + leading_nibble); aligned_significand &= hex_mask; diff --git a/tools/pow5.py b/tools/pow5.py deleted file mode 100644 index 1c33e40..0000000 --- a/tools/pow5.py +++ /dev/null @@ -1,42 +0,0 @@ -# // Copyright 2020-2023 Daniel Lemire -# // Copyright 2023 Matt Borland -# // Distributed under the Boost Software License, Version 1.0. -# // https://www.boost.org/LICENSE_1_0.txt - -def format_hex(number): - upper = number // (1 << 128) - lower = number % (1 << 128) - big_upper = upper // (1 << 64) - big_lower = upper % (1 << 64) - little_upper = lower // (1 << 64) - little_lower = lower % (1 << 64) - print("{"+hex(big_upper)+","+hex(big_lower)+"},{"+hex(little_upper)+","+hex(little_lower)+"},") - - -for q in range(-4951, 0): - power5 = 5 ** -q - z = 0 - while (1 << z) < power5: - z += 1 - if q >= -55: - b = z + 255 - c = 2 ** b // power5 + 1 - format_hex(c) - else: - b = 2 * z + 2 * 128 - c = 2 ** b // power5 + 1 - # truncate - while c >= (1 << 256): - c //= 2 - format_hex(c) - - -for q in range(0, 4931 + 1): - power5 = 5 ** q - # move the most significant bit in position - while power5 < (1 << 255): - power5 *= 2 - # *truncate* - while power5 >= (1 << 256): - power5 //= 2 - format_hex(power5)