Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ryu/d2s_small_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ static const uint64_t DOUBLE_POW5_INV_SPLIT2[15][2] = {
{ 10313493231639821582u, 1313665730009899186u },
{ 12701016819766672773u, 2032799256770390445u }
};
static const uint32_t POW5_INV_OFFSETS[19] = {
static const uint32_t POW5_INV_OFFSETS[22] = {
0x54544554, 0x04055545, 0x10041000, 0x00400414, 0x40010000, 0x41155555,
0x00000454, 0x00010044, 0x40000000, 0x44000041, 0x50454450, 0x55550054,
0x51655554, 0x40004000, 0x01000001, 0x00010500, 0x51515411, 0x05555554,
0x00000000
0x50411500, 0x40040000, 0x05040110, 0x00000000,
};

static const uint64_t DOUBLE_POW5_SPLIT2[13][2] = {
Expand Down Expand Up @@ -173,6 +173,7 @@ static inline void double_computeInvPow5(const uint32_t i, uint64_t* const resul
}
// high1 | sum | low0
const uint32_t delta = pow5bits(base2) - pow5bits(i);
assert (i/16 < sizeof(POW5_INV_OFFSETS) / sizeof(POW5_INV_OFFSETS[0]));
result[0] = shiftright128(low0, sum, delta) + 1 + ((POW5_INV_OFFSETS[i / 16] >> ((i % 16) << 1)) & 3);
result[1] = shiftright128(sum, high1, delta);
}
Expand Down
Loading