Lines Matching defs:reciprocal
78 // [1, 2.0) and get a Q32 approximate reciprocal using a small minimax
79 // polynomial approximation: reciprocal = 3/4 + 1/sqrt(2) - b/2. This
82 uint32_t reciprocal = UINT32_C(0x7504f333) - q31b;
84 // Now refine the reciprocal estimate using a Newton-Raphson iteration:
92 correction = -((uint64_t)reciprocal * q31b >> 32);
93 reciprocal = (uint64_t)reciprocal * correction >> 31;
94 correction = -((uint64_t)reciprocal * q31b >> 32);
95 reciprocal = (uint64_t)reciprocal * correction >> 31;
96 correction = -((uint64_t)reciprocal * q31b >> 32);
97 reciprocal = (uint64_t)reciprocal * correction >> 31;
99 // Exhaustive testing shows that the error in reciprocal after three steps
101 // expectations. We bump the reciprocal by a tiny value to force the error
105 reciprocal -= 2;
107 // The numerical reciprocal is accurate to within 2^-28, lies in the
109 // than the true reciprocal of b. Multiplying a by this reciprocal thus
116 // is the error in the reciprocal of b scaled by the maximum
119 rep_t quotient = (uint64_t)reciprocal*(aSignificand << 1) >> 32;