45#define FLOAT_MANTISSA_BITS 23
46#define FLOAT_EXPONENT_BITS 8
53#define FLOAT_POW5_INV_BITCOUNT 59
64#define FLOAT_POW5_BITCOUNT 61
112 return (
value & ((1u << p) - 1)) == 0;
133#ifdef RYU_32_BIT_PLATFORM
146 const int32 s = shift - 32;
240 const bool even = (
m2 & 1) == 0;
276 if (q != 0 && (
vp - 1) / 10 <=
vm / 10)
324 if (q != 0 && (
vp - 1) / 10 <=
vm / 10)
370 while (
vp / 10 >
vm / 10)
414 while (
vp / 10 >
vm / 10)
471 memcpy(result,
"0.000000", 8);
573 result[
index++] =
'-';
664 result[
index + 1] =
'.';
673 result[
index++] =
'e';
676 result[
index++] =
'-';
680 result[
index++] =
'+';
712 const uint32 mask = (1U << -
e2) - 1;
786 result[
index] =
'\0';
#define Assert(condition)
static int to_chars(const floating_decimal_32 v, const bool sign, char *const result)
#define FLOAT_POW5_INV_BITCOUNT
static const uint64 FLOAT_POW5_SPLIT[47]
static bool multipleOfPowerOf2(const uint32 value, const uint32 p)
int float_to_shortest_decimal_buf(float f, char *result)
int float_to_shortest_decimal_bufn(float f, char *result)
static uint32 pow5Factor(uint32 value)
static uint32 decimalLength(const uint32 v)
#define FLOAT_MANTISSA_BITS
#define FLOAT_POW5_BITCOUNT
static bool f2d_small_int(const uint32 ieeeMantissa, const uint32 ieeeExponent, floating_decimal_32 *v)
static uint32 mulPow5InvDivPow2(const uint32 m, const uint32 q, const int32 j)
static uint32 mulPow5divPow2(const uint32 m, const uint32 i, const int32 j)
static bool multipleOfPowerOf5(const uint32 value, const uint32 p)
static floating_decimal_32 f2d(const uint32 ieeeMantissa, const uint32 ieeeExponent)
static const uint64 FLOAT_POW5_INV_SPLIT[31]
static int to_chars_f(const floating_decimal_32 v, const uint32 olength, char *const result)
#define FLOAT_EXPONENT_BITS
char * float_to_shortest_decimal(float f)
static uint32 mulShift(const uint32 m, const uint64 factor, const int32 shift)
static const char DIGIT_TABLE[200]
static int fd(const char *x, int i)
static uint32 float_to_bits(const float f)
static uint32 pow5bits(const int32 e)
static int32 log10Pow5(const int32 e)
static int copy_special_str(char *const result, const bool sign, const bool exponent, const bool mantissa)
static int32 log10Pow2(const int32 e)
#define FLOAT_SHORTEST_DECIMAL_LEN