52 Ri = NUMERATOR / (hl-ll);
63 Ri = NUMERATOR / (hl-ll);
77 Ri = NUMERATOR / (hl-ll);
89 typename IntegerType<
sizeof(T)>::unsigned_type sub = in-hl;
96 typename IntegerType<
sizeof(T)>::unsigned_type q = ((
typename IntegerType<
sizeof(T)+
sizeof(T)>::unsigned_type) sub*Ri) >> SHIFT;
97 typename IntegerType<
sizeof(T)>::unsigned_type r = sub - q*R;
98 if (q&0b1)
return ll+r;
104 typename IntegerType<
sizeof(T)>::unsigned_type sub = ll-in;
105 typename IntegerType<
sizeof(T)>::unsigned_type q = ((
typename IntegerType<
sizeof(T)+
sizeof(T)>::unsigned_type) sub*Ri) >> SHIFT;
106 typename IntegerType<
sizeof(T)>::unsigned_type r = sub - q*R;
107 if (q&0b1)
return hl-r;
118 static const uint8_t SHIFT = (
sizeof(
T) << 3);