~vyivel/libnyth

0542611d422d8b5a79b788e0a6d5b85874a1508b — Kirill Primak 5 months ago c4afc6e
snconv: fix typos
1 files changed, 2 insertions(+), 2 deletions(-)

M src/snconv.c
M src/snconv.c => src/snconv.c +2 -2
@@ 1398,7 1398,7 @@ small_divisor:
	bool y_parity, y_integer;
	dragonbox_parity_integer(two_fc, p10m, beta, &y_parity, &y_integer);

	// dist = r + (10^kappa)/2 - floor(delta / 2)
	// dist = r + (10^kappa) / 2 - floor(delta / 2)
	uint32_t dist = r + 50 - (delta / 2);
	bool dist_parity = (dist - 50) & 1;



@@ 1438,7 1438,7 @@ static void dec_from_float_dragonbox_shorter(struct dec *dec, int exp2) {
	// 2 ≤ exp2 ≤ 2 + floor(log2((10^d1 + 1) / 3)), where d1 is
	// the number of times (2^(p+2) - 1) is divisible by 5, and p is
	// the number of mantissa bits. d1 = 0, therefore x is an integer if
	// 2 ≤ exp2 ≤ 3, and not an integer if exp < 2 or exp2 > 3.
	// 2 ≤ exp2 ≤ 3, and not an integer if exp2 < 2 or exp2 > 3.
	if (exp2 < 2 || exp2 > 3) {
		++x;
	}