Lines Matching refs:SQ
2996 APInt SQ = D.sqrt();
2998 APInt Q = SQ * SQ;
3000 // The calculated SQ may actually be greater than the exact (non-integer)
3001 // value. If that's the case, decrement SQ to get a value that is lower.
3003 SQ -= 1;
3008 // SQ is rounded down (i.e SQ * SQ <= D), so the roots may be inexact.
3010 // may be greater than the exact one, since we would be subtracting SQ.
3012 // one, subtract SQ+1 when calculating the low root (for inexact value
3013 // of SQ).
3015 APInt::sdivrem(-B - (SQ+InexactSQ), TwoA, X, Rem);
3017 APInt::sdivrem(-B + SQ, TwoA, X, Rem);
3029 assert((SQ*SQ).sle(D) && "SQ = |_sqrt(D)_|, so SQ*SQ <= D");
3030 // The exact value of the square root of D should be between SQ and SQ+1.
3032 // SQ (i.e. X) and that corresponding to SQ+1.