52 uint32_t over_left_shift = __builtin_clz(bitsuk(tau)) - 15;
55 if (p >= over_left_shift) {
60 uint64_t accumulator = ((uint64_t) bitsuk(tau)) << (bitsk(p) >> 15);
61 uint32_t fract_bits = bitsk(p) & 0x7FFF;
64 for (uint32_t i = 0; i < 15; i++) {
65 uint32_t bit = (fract_bits >> (14 - i)) & 0x1;
71 if (accumulator >= bitsuk(1.0ulk)) {
79 return (uint32_t) ((accumulator * 0xFFFFFFFFL) >> 16);
95 uint32_t over_right_shift = 32 - __builtin_clz(bitsuk(tau));
100 if (val >= over_right_shift) {
105 uint64_t accumulator = ((uint64_t) bitsuk(tau)) >> (bitsk(val) >> 15);
106 uint32_t fract_bits = bitsk(val) & 0x7FFF;
109 for (uint32_t i = 0; i < 15; i++) {
110 uint32_t bit = (fract_bits >> (14 - i)) & 0x1;
116 if (accumulator == 0) {
124 return (uint32_t) ((accumulator * 0xFFFFFFFFL) >> 16);