#include "math.h" int isqrt(int v) { int i; int j; i = 1; j = 1; while (j < v) { i <<= 1; j <<= 2; } while ((i < j) || (i > j+1)) { j = i; i = (i + (v/i)) / 2; } return(i); } unsigned int how_many(unsigned int n, unsigned int divr) { return((n+divr-1)/divr); }