Lines Matching refs:validity

145 CheckedAdd(T x, T y, RangeConstraint* validity) {
156 *validity = RANGE_VALID;
158 *validity = HasSignBit(uresult) ? RANGE_OVERFLOW : RANGE_UNDERFLOW;
161 *validity = BinaryComplement(x) >= y ? RANGE_VALID : RANGE_OVERFLOW;
168 CheckedSub(T x, T y, RangeConstraint* validity) {
179 *validity = RANGE_VALID;
181 *validity = HasSignBit(uresult) ? RANGE_OVERFLOW : RANGE_UNDERFLOW;
184 *validity = x >= y ? RANGE_VALID : RANGE_UNDERFLOW;
197 CheckedMul(T x, T y, RangeConstraint* validity) {
201 *validity = DstRangeRelationToSrcRange<T>(tmp);
210 CheckedMul(T x, T y, RangeConstraint* validity) {
217 *validity =
220 *validity = y >= std::numeric_limits<T>::min() / x ? RANGE_VALID
225 *validity = x >= std::numeric_limits<T>::min() / y ? RANGE_VALID
228 *validity =
240 CheckedMul(T x, T y, RangeConstraint* validity) {
241 *validity = (y == 0 || x <= std::numeric_limits<T>::max() / y)
252 RangeConstraint* validity,
256 *validity = RANGE_OVERFLOW;
260 *validity = RANGE_VALID;
268 CheckedMod(T x, T y, RangeConstraint* validity) {
269 *validity = y > 0 ? RANGE_VALID : RANGE_INVALID;
277 CheckedMod(T x, T y, RangeConstraint* validity) {
278 *validity = RANGE_VALID;
286 CheckedNeg(T value, RangeConstraint* validity) {
287 *validity =
297 CheckedNeg(T value, RangeConstraint* validity) {
299 *validity = value ? RANGE_UNDERFLOW : RANGE_VALID;
308 CheckedAbs(T value, RangeConstraint* validity) {
309 *validity =
318 CheckedAbs(T value, RangeConstraint* validity) {
320 *validity = RANGE_VALID;
392 CheckedNumericState(Src value, RangeConstraint validity)
394 validity_(GetRangeConstraint(validity |
405 rhs.validity() | DstRangeRelationToSrcRange<T>(rhs.value()))) {}
415 RangeConstraint validity() const { return validity_; }
434 RangeConstraint validity,
467 RangeConstraint validity() const {