Home | History | Annotate | Download | only in builtins

Lines Matching refs:reciprocal

80     // [1, 2.0) and get a Q32 approximate reciprocal using a small minimax
81 // polynomial approximation: reciprocal = 3/4 + 1/sqrt(2) - b/2. This
84 uint32_t reciprocal = UINT32_C(0x7504f333) - q31b;
86 // Now refine the reciprocal estimate using a Newton-Raphson iteration:
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;
98 correction = -((uint64_t)reciprocal * q31b >> 32);
99 reciprocal = (uint64_t)reciprocal * correction >> 31;
101 // Exhaustive testing shows that the error in reciprocal after three steps
103 // expectations. We bump the reciprocal by a tiny value to force the error
107 reciprocal -= 2;
109 // The numerical reciprocal is accurate to within 2^-28, lies in the
111 // than the true reciprocal of b. Multiplying a by this reciprocal thus
118 // is the error in the reciprocal of b scaled by the maximum
121 rep_t quotient = (uint64_t)reciprocal*(aSignificand << 1) >> 32;