36 #define DIV_H_INV_15625_32    0x431bde83ul 
   41 #define DIV_H_INV_15625_64    0x431bde82d7b634dbull 
   46 #define DIV_H_INV_15625_SHIFT 12 
   61 uint64_t _div_mulhi64(
const uint64_t a, 
const uint64_t b);
 
   71     if (val > 16383999997ull) {
 
   93   assert(val <= 536870911999LLU);
 
   95   uint32_t hi = val >> 32;
 
   97   uint32_t r = (lo >> 16) + (hi << 16);
 
   98   uint32_t res = r / 125;
 
   99   r = ((r % 125) << 16) + (lo & 0xFFFF);
 
  100   res = (res << 16) + r / 125;
 
  149     if (val > 16383999997ull) {
 
  165     return ((uint64_t)val * 0xBC8F1391UL) >> (15 + 32);
 
POSIX.1-2008 compliant version of the assert macro.
 
#define assert(cond)
abort the program if assertion is false
 
static uint32_t div_u64_by_125(uint64_t val)
Integer divide val by 125.
 
static uint32_t div_u32_mod_44488(uint32_t val)
Modulo 44488.
 
static uint64_t div_u64_by_1000000(uint64_t val)
Integer divide val by 1000000.
 
static uint32_t div_u32_by_15625div512(uint32_t val)
Divide val by (15625/512)
 
static uint64_t div_u64_by_15625(uint64_t val)
Integer divide val by 15625, 64 bit version.
 
#define DIV_H_INV_15625_64
Approximation of (2**l)/d for d=15625, l=12, 64 bits.
 
#define DIV_H_INV_15625_32
Approximation of (2**l)/d for d=15625, l=12, 32 bits.
 
static uint32_t div_u32_by_44488(uint32_t val)
Integer divide val by 44488.
 
#define DIV_H_INV_15625_SHIFT
Required shifts for division by 15625, l above.
 
static uint64_t div_u64_by_15625div512(uint64_t val)
Divide val by (15625/512)