impl isqrti & ilog2i